Comment 1 for bug 1010079

Revision history for this message
Peter Beaman (pbeaman) wrote :

Diagnosis:

Various bad symptoms stem from the same root cause. Exchange.LevelCache members refer to existing Buffers. Fast path verifies that Buffer referenced by a LevelCache element has not changed since the last time the thread used that Buffer by comparing generation numbers. If the Buffer can be claimed, has the same volume, page address and generation number, then Exchange assumes its content has not changed and simply uses it.

New code added to prune Long MVV values fails to update the generation accurately. The bug is subtle since code in the Buffer#pruneMvvValues method does indeed adjust the generation number appropriately. However the Buffer copy constructor used in this code path does not copy the generation number, and therefore the update attempted in pruneMvvValues is fruitless.

In addition, pruneLongMvvValues uses a Value object obtained from a ThreadLocal. However, this same Value is already in use by Exchange#storeInternal.