Chance of duplicate allocation when insert followed by delet
Main Memory Database Cache
Brought to you by:
prabatuty
deleteTuple() currently marks the rows deleted.
It will set the usedflag to false, but locks will be held till commit and it shall be rolled back later. So we need to make sure that it does not allocate a deleted tuple which is yet to be commited by another transaction.
Fix:
check whether the data item is locked before allocating.
Logged In: YES
user_id=1500244
Originator: YES
It is better to take the lock during allocation itself after checking whether it is locked. this will save us lot of cpu cycles. but it will make the allocation module dependent on the locking module..guess it is ok as it will not add any overhead during the insertTuple() method.