sonatype-lift[bot] commented on code in PR #1905: URL: https://github.com/apache/zookeeper/pull/1905#discussion_r923008783
########## zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java: ########## @@ -328,11 +322,12 @@ protected void pRequest2Txn(int type, long zxid, Request request, Record record, case OpCode.create2: case OpCode.createTTL: case OpCode.createContainer: { - pRequest2TxnCreate(type, request, record, deserialize); + pRequest2TxnCreate(type, request, record); Review Comment: *THREAD_SAFETY_VIOLATION:* Unprotected write. Non-private method `PrepRequestProcessor.pRequest2Txn(...)` indirectly writes to field `server.ZooKeeperServer.RATE_LOGGER.count` outside of synchronization. Reporting because this access may occur on a background thread. Reply with *"**@sonatype-lift help**"* for info about LiftBot commands. Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the above finding from this PR. Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all the findings from this PR and from the status bar in Github. When talking to LiftBot, you need to **refresh** the page to see its response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get to know more about LiftBot commands. --- Was this a good recommendation? [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=299351388&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=299351388&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299351388&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299351388&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=299351388&lift_comment_rating=5) ] ########## zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java: ########## @@ -387,9 +379,6 @@ protected void pRequest2Txn(int type, long zxid, Request request, Record record, Review Comment: *THREAD_SAFETY_VIOLATION:* Read/Write race. Non-private method `PrepRequestProcessor.pRequest2Txn(...)` indirectly reads without synchronization from `auth.ProviderRegistry.initialized`. Potentially races with write in method `PrepRequestProcessor.pRequest2Txn(...)`. Reporting because this access may occur on a background thread. Reply with *"**@sonatype-lift help**"* for info about LiftBot commands. Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the above finding from this PR. Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all the findings from this PR and from the status bar in Github. When talking to LiftBot, you need to **refresh** the page to see its response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get to know more about LiftBot commands. --- Was this a good recommendation? [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=299351395&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=299351395&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299351395&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299351395&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=299351395&lift_comment_rating=5) ] ########## zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java: ########## @@ -311,13 +310,8 @@ private String validatePathForCreate(String path, long sessionId) throws BadArgu /** * This method will be called inside the ProcessRequestThread, which is a * singleton, so there will be a single thread calling this code. - * - * @param type - * @param zxid - * @param request - * @param record */ - protected void pRequest2Txn(int type, long zxid, Request request, Record record, boolean deserialize) throws KeeperException, IOException, RequestProcessorException { + protected void pRequest2Txn(int type, long zxid, Request request, Record record) throws KeeperException, IOException, RequestProcessorException { if (request.getHdr() == null) { request.setHdr(new TxnHeader(request.sessionId, request.cxid, zxid, Review Comment: *THREAD_SAFETY_VIOLATION:* Unprotected write. Non-private method `PrepRequestProcessor.pRequest2Txn(...)` indirectly writes to field `request.hdr` outside of synchronization. Reporting because this access may occur on a background thread. Reply with *"**@sonatype-lift help**"* for info about LiftBot commands. Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the above finding from this PR. Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all the findings from this PR and from the status bar in Github. When talking to LiftBot, you need to **refresh** the page to see its response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get to know more about LiftBot commands. --- Was this a good recommendation? [ [🙁 Not relevant](https://www.sonatype.com/lift-comment-rating?comment=299352045&lift_comment_rating=1) ] - [ [😕 Won't fix](https://www.sonatype.com/lift-comment-rating?comment=299352045&lift_comment_rating=2) ] - [ [😑 Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299352045&lift_comment_rating=3) ] - [ [🙂 Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=299352045&lift_comment_rating=4) ] - [ [😊 Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=299352045&lift_comment_rating=5) ] -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org