HCOLL-167 works with a small number of entries, there is a bug if we have a large number of entries

This commit is contained in:
Rob Austin
2014-10-27 13:14:56 +00:00
parent 95626f3ea2
commit dceb852092
3 changed files with 65 additions and 22 deletions
@@ -558,14 +558,6 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
assert bytes.limit() == bytes.capacity();
LOG.info("bytes after position=" + bytes.position() +
", " +
"limit=" + bytes.limit() + ",capacity=" + bytes.capacity());
LOG.info("buffer after position=" + buffer.position() +
", " +
"limit=" + buffer.limit() + ",capacity=" + buffer.capacity());
}
@@ -616,12 +608,15 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
Bytes in = blockingFetch(sizeLocation);
long size = in.readStopBit();
LOG.info("size="+size);
Set<Map.Entry<K, V>> result = new HashSet<Map.Entry<K, V>>();
for (int i = 0; i < size; i++) {
K k = keyValueSerializer.readKey(in);
V v = keyValueSerializer.readValue(in);
LOG.info("k="+k);
LOG.info("v="+v);
result.add(new Entry(k, v));
}
@@ -548,12 +548,9 @@ class TcpReplicator extends AbstractChannelReplicator implements Closeable {
if (completed)
attached.entryWriter.workCompleted();
attached.hasRemoteHeartbeatInterval = false;
return;
}
// attached.hasRemoteHeartbeatInterval = false;
if (attached.remoteModificationIterator != null)
} else if (attached.remoteModificationIterator != null)
attached.entryWriter.entriesToBuffer(attached.remoteModificationIterator, key);
try {