You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/08/20 15:57:47 UTC

[GitHub] [cassandra] smiklosovic commented on a change in pull request #1160: CASSANDRA-16721 Move RepairedDataInfo to the execution controller rather than the ReadCommand to avoid unintended sharing

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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org