belliottsmith commented on code in PR #65:
URL: https://github.com/apache/cassandra-accord/pull/65#discussion_r1442888092
##########
accord-core/src/test/java/accord/burn/BurnTest.java:
##########
@@ -217,21 +254,41 @@ static void burn(RandomSource random, TopologyFactory
topologyFactory, List<Id>
.asLongSupplier(forked);
};
- Verifier verifier = createVerifier(keyCount);
- SimulatedDelayedExecutorService globalExecutor = new
SimulatedDelayedExecutorService(queue, null);
-
+ SimulatedDelayedExecutorService globalExecutor = new
SimulatedDelayedExecutorService(queue, new ListAgent(1000L, failures::add,
retryBootstrap, (i1, i2) -> {
+ throw new IllegalAccessError("Global executor should enver get a
stale event");
+ }));
+ Int2ObjectHashMap<Verifier> validators = new Int2ObjectHashMap<>();
Function<CommandStore, AsyncExecutor> executor = ignore ->
globalExecutor;
MessageListener listener = MessageListener.get();
- Packet[] requests = toArray(generate(random, listener, executor,
clients, nodes, keyCount, operations), Packet[]::new);
+ if (keyCount > ((long) HASH_RANGE_END - (long) HASH_RANGE_START + 1L))
+ throw new AssertionError(String.format("Attempted to create %d
keys which is larger than the range (%d, %d]", keyCount, HASH_RANGE_START,
HASH_RANGE_END));
Review Comment:
Why is that a bug? Multiple keys can map to a single hash. It should be fine
to run with a hash range of [0..1) an 1000 keys if we want.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]