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/03/06 20:12:48 UTC

[GitHub] [zookeeper] muse-dev[bot] commented on a change in pull request #1588: Install Zookeeper on IBM Cloud

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



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java
##########
@@ -394,6 +394,7 @@ protected void pRequest2Txn(int type, long zxid, Request request, Record record,
             validatePath(path, request.sessionId);
             nodeRecord = getRecordForPath(path);
             zks.checkACL(request.cnxn, nodeRecord.acl, ZooDefs.Perms.WRITE, request.authInfo, path, null);
+            zks.checkQuota(path, nodeRecord.data, setDataRequest.getData(), OpCode.setData);

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Read/Write race. Non-private method `PrepRequestProcessor.pRequest2Txn(...)` indirectly reads without synchronization from `server.ZooKeeperServer.RATE_LOGGER.count`. Potentially races with write in method `PrepRequestProcessor.pRequest(...)`.
    Reporting because this access may occur on a background thread.
   (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