mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Fix a bug in source code & spec -- entry relocation on put() should acquire write lock
This commit is contained in:
@@ -188,6 +188,7 @@ public abstract class MapEntryStages<K, V> extends HashEntryStages<K>
|
||||
}
|
||||
|
||||
protected void relocation(Data<V> newValue, long newSizeOfEverythingBeforeValue) {
|
||||
s.innerWriteLock.lock();
|
||||
s.free(pos, entrySizeInChunks);
|
||||
long entrySize = innerEntrySize(newSizeOfEverythingBeforeValue, newValue.size());
|
||||
allocatedChunks.initEntryAndKeyCopying(entrySize, valueSizeOffset - keySizeOffset);
|
||||
|
||||
Reference in New Issue
Block a user