Make IterationContexts' hashLookupPos depend on segmentTier as well as QueryContexts'; add missed hashLookupPos step back in iteration, if hash lookup slot is removed, because entry is relocated to a chained tier; add missed tierIndex initialization in initSegmentTier_WithBaseAddr()

This commit is contained in:
leventov
2015-10-07 16:43:37 +03:00
parent 03a761ebbf
commit 81535163b2
8 changed files with 96 additions and 52 deletions
@@ -54,7 +54,7 @@ import net.openhft.sg.Staged;
KeySearch.class,
InputKeyHashCode.class,
QueryHashLookupSearch.class,
QueryHashLookupPos.class,
HashLookupPos.class,
QueryCheckOnEachPublicOperation.class,
SearchAllocatedChunks.class,
@@ -58,7 +58,7 @@ import net.openhft.sg.Staged;
KeySearch.class,
InputKeyHashCode.class,
QueryHashLookupSearch.class,
QueryHashLookupPos.class,
HashLookupPos.class,
QueryCheckOnEachPublicOperation.class,
SearchAllocatedChunks.class,
@@ -201,7 +201,8 @@ public abstract class MapEntryStages<K, V> extends HashEntryStages<K>
if (tierHasChanged) {
// implicitly inits key search, locating hashLookupPos on the empty slot
assert ks.searchStateAbsent();
if (!ks.searchStateAbsent())
throw new AssertionError();
}
initValue(newValue);