smiklosovic commented on a change in pull request #1160:
URL: https://github.com/apache/cassandra/pull/1160#discussion_r693054226



##########
File path: 
test/distributed/org/apache/cassandra/distributed/test/RepairDigestTrackingTest.java
##########
@@ -340,6 +347,99 @@ else if (ccAfterPartitionRead != ccBefore)
         }
     }
 
+    /**
+     * In CASSANDRA-16721, we discovered that if responses from remote 
replicas came back while the local runnable was 
+     * still executing, the fact that {@link ReadCommand} was mutable meant 
that the trackRepairedStatus flag on the
+     * command instance could move from false to true in executeLocally(), 
between setting the 
+     * RepairedDataInfo/gathering the sstables and calling extend(). When this 
happened, the RDI was still the 
+     * stand-in object NO_OP_REPAIRED_DATA_INFO, which has a null 
repairedDataCounter, and we hit the NPE.
+     * 
+     * Similarly, the trackRepairedStatus flag could be set after the point at 
which the RDI is set on the local 
+     * read, assigned to the repairedDataInfo in {@link ReadCommand}, and 
improperly shared between initial local read
+     * and the local read triggered by read repair.
+     * 
+     * These problems are now sidestepped completely by CASSANDRA-16721, as an 
RDI instance is ow created and destroyed 

Review comment:
       ow -> now




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