mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-366 Changed this method from recursive to use iteration. No longer shows up as a problem. Also reduce the maximum depth from 16K to 1K.
This commit is contained in:
@@ -1368,8 +1368,8 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
|
||||
final SearchState searchState = new SearchState();
|
||||
|
||||
private SegmentState(int depth) {
|
||||
if (depth > (1 << 16))
|
||||
throw new IllegalStateException("More than " + (1 << 16) +
|
||||
if (depth > (1 << 10))
|
||||
throw new IllegalStateException("More than " + (1 << 10) +
|
||||
" nested ChronicleMap contexts are not supported. Very probable that you " +
|
||||
"simply forgot to close context somewhere (recommended to use " +
|
||||
"try-with-resources statement). " +
|
||||
@@ -1383,9 +1383,14 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
|
||||
used = true;
|
||||
return this;
|
||||
}
|
||||
if (next != null)
|
||||
return next.get();
|
||||
return next = new SegmentState(depth + 1);
|
||||
SegmentState ss;
|
||||
for (ss = this; ss.next != null; ss = ss.next) {
|
||||
if (!ss.used) {
|
||||
used = true;
|
||||
return ss;
|
||||
}
|
||||
}
|
||||
return ss.next = new SegmentState(depth + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,6 @@ package net.openhft.chronicle.map;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.Closeable;
|
||||
@@ -40,7 +39,6 @@ import static org.junit.Assert.assertTrue;
|
||||
*
|
||||
* @author Rob Austin.
|
||||
*/
|
||||
@Ignore("TODO https://higherfrequencytrading.atlassian.net/browse/HCOLL-366")
|
||||
public class TCPSocketReplicationTest {
|
||||
|
||||
static int s_port = 12050;
|
||||
|
||||
Reference in New Issue
Block a user