aweisberg commented on code in PR #46:
URL: https://github.com/apache/cassandra-accord/pull/46#discussion_r1204589729


##########
accord-core/src/main/java/accord/local/CommandStores.java:
##########
@@ -371,9 +376,12 @@ private synchronized TopologyUpdate updateTopology(Node 
node, Snapshot prev, Top
                 RangesForEpochHolder rangesHolder = new RangesForEpochHolder();
                 ShardHolder shardHolder = new 
ShardHolder(supplier.create(nextId++, rangesHolder), rangesHolder);
                 rangesHolder.current = new RangesForEpoch(epoch, add, 
shardHolder.store);
-                // the first epoch we assume is either empty, or correctly 
initialised by whatever system is migrating
-                if (epoch == 1) bootstrapUpdates.add(() -> 
shardHolder.store.initialise(epoch, add));
-                else bootstrapUpdates.add(shardHolder.store.bootstrapper(node, 
add, newLocalTopology.epoch()));
+
+                Ranges.Partition partition = add.partition(range -> 
shouldBootstrap(node, prev.local, newLocalTopology, range));

Review Comment:
   Ah, I missed the override that adds the contains check.



##########
accord-core/src/main/java/accord/topology/Topology.java:
##########
@@ -258,16 +260,36 @@ private <P1> int[] subsetFor(Unseekables<?, ?> select, 
IndexedPredicate<P1> pred
                     if (abi < 0)
                     {
                         if (ailim < as.size())
-                            throw new IllegalArgumentException("Range not 
found for " + as.get(ailim));
+                        {
+                            switch (onUnknown)
+                            {
+                                case REJECT: throw new 
IllegalArgumentException("Range not found for " + as.get(ailim));
+                                case IGNORE:
+                                    break;
+                                default:
+                                    throw new 
IllegalArgumentException("Unknown option: " + onUnknown);
+                            }
+                        }
                         break;
                     }
 
                     ai = (int)abi;
+                    boolean skip = false;
                     if (ailim < ai)
-                        throw new IllegalArgumentException("Range not found 
for " + as.get(ailim));
+                    {
+                        switch (onUnknown)
+                        {
+                            default:
+                                throw new IllegalArgumentException("Unknown 
option: " + onUnknown);
+                            case REJECT: throw new 
IllegalArgumentException("Range not found for " + as.get(ailim));
+                            case IGNORE:
+                                bi = (int)(abi >>> 32);

Review Comment:
   Still unused FYI



-- 
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]

Reply via email to