You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/05/21 00:04:13 UTC

[GitHub] [zookeeper] muse-dev[bot] commented on a change in pull request #1491: ZOOKEEPER-3964: Introduce RocksDB snap and implement change data capture to enable incremental snapshot

muse-dev[bot] commented on a change in pull request #1491:
URL: https://github.com/apache/zookeeper/pull/1491#discussion_r636550440



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java
##########
@@ -853,6 +907,10 @@ public ProcessTxnResult processTxn(TxnHeader header, Record txn) {

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Unprotected write. Non-private method `DataTree.processTxn(...)` indirectly mutates container `this.changeList` via call to `List.clear()` outside of synchronization.
    Reporting because another access to the same memory occurs on a background thread, although this access may not.
   (at-me [in a reply](https://docs.muse.dev/docs/talk-to-muse/) with `help` or `ignore`)

##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/ZKDatabase.java
##########
@@ -480,7 +482,19 @@ public void setlastProcessedZxid(long zxid) {
      * datatree/zkdatabase
      */
     public ProcessTxnResult processTxn(TxnHeader hdr, Record txn, TxnDigest digest) {
-        return dataTree.processTxn(hdr, txn, digest);
+        ProcessTxnResult rc = dataTree.processTxn(hdr, txn, digest);

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Unprotected write. Non-private method `ZKDatabase.processTxn(...)` indirectly mutates container `this.dataTree.changeList` via call to `List.clear()` outside of synchronization.
    Reporting because another access to the same memory occurs on a background thread, although this access may not.
   (at-me [in a reply](https://docs.muse.dev/docs/talk-to-muse/) with `help` or `ignore`)




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

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