Tweek the sizing rules as well as optimise the hashing algo so it creates a more even distribution (for at least one set of test cases)

This commit is contained in:
Peter Lawrey
2014-10-23 21:20:46 +01:00
parent 113c51566a
commit 9a8a2512f0
8 changed files with 210 additions and 29 deletions
@@ -262,7 +262,7 @@ class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, KI>,
int segmentNum = getSegment(hash);
int segmentHash = segmentHash(hash);
return segment(segmentNum).acquire(copies, metaKeyWriter, keyWriter, key, value,
segmentHash, create, timeProvider.currentTimeMillis());
segmentHash, create, create ? timeProvider.currentTimeMillis() : 0L);
}
@Override