dcapwell commented on code in PR #3656:
URL: https://github.com/apache/cassandra/pull/3656#discussion_r1828431129


##########
test/distributed/org/apache/cassandra/distributed/shared/ClusterUtils.java:
##########
@@ -1510,5 +1573,67 @@ public static TableId tableId(Cluster cluster, String 
ks, String table)
         String str = cluster.getFirstRunningInstance().callOnInstance(() -> 
Schema.instance.getKeyspaceInstance(ks).getColumnFamilyStore(table).getTableId().toString());
         return TableId.fromUUID(UUID.fromString(str));
     }
+
+    public static void awaitInPeers(Cluster cluster, int[] nodes, IInstance 
expectedInPeers)

Review Comment:
   > 10) fixed a race condition bug in Harry where the TokenPlacementModel 
could see a partial row causing NPEs down the line
   
   This is a better fix than the one in harry, but since harry is used in other 
contexts I kept the logic there...
   
   TCM async updates the peers tables, and the updates are not atomic and the 
caller can see partial state... this logic makes sure that the expected peer is 
*complete* in the expected nodes... this resolves the infrequent NPEs in Harry 
(which the retries at that layer are trying to do as well)



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