belliottsmith commented on a change in pull request #1:
URL: https://github.com/apache/cassandra-accord/pull/1#discussion_r798465636
##########
File path:
accord-core/src/main/java/accord/coordinate/tracking/AbstractResponseTracker.java
##########
@@ -2,22 +2,26 @@
import accord.local.Node;
import accord.topology.Shard;
-import accord.topology.Shards;
+import accord.topology.Topologies;
+import accord.topology.Topology;
import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
-import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.Predicate;
-abstract class AbstractResponseTracker<T extends
AbstractResponseTracker.ShardTracker>
+public abstract class AbstractResponseTracker<T extends
AbstractResponseTracker.ShardTracker>
{
- private final Shards shards;
+ private static final int[] SINGLETON_OFFSETS = new int[0];
+ private final Topologies topologies;
private final T[] trackers;
+ private final int[] offsets;
Review comment:
suggestion: can simply compute the `sizePerTopology` and leave the last
elements of `trackers` null for those topology with fewer trackers, as most
topology will have around the same number of trackers?
--
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]