sonatype-lift[bot] commented on code in PR #1811:
URL: https://github.com/apache/zookeeper/pull/1811#discussion_r941331424
##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java:
##########
@@ -441,12 +445,14 @@ public void updateCountBytes(String lastPrefix, long
bytesDiff, int countDiff) {
* @throws NodeExistsException
* @throws NoNodeException
*/
- public void createNode(final String path, byte[] data, List<ACL> acl, long
ephemeralOwner, int parentCVersion, long zxid, long time) throws
NoNodeException, NodeExistsException {
- createNode(path, data, acl, ephemeralOwner, parentCVersion, zxid,
time, null);
+ public void createNode(Long sessionId, final String path, byte[] data,
List<ACL> acl, long ephemeralOwner, int parentCVersion, long zxid, long time)
throws NoNodeException, NodeExistsException {
+ createNode(sessionId, path, data, acl, ephemeralOwner, parentCVersion,
zxid, time, null);
Review Comment:
💬 21 similar findings have been found in this PR
---
*THREAD_SAFETY_VIOLATION:* Read/Write race. Non-private method
`DataTree.createNode(...)` indirectly reads with synchronization from container
`this.aclCache.aclKeyMap` via call to `Map.get(...)`. Potentially races with
unsynchronized write in method `DataTree.deserialize(...)`.
Reporting because another access to the same memory occurs on a background
thread, although this access may not.
---
<details><summary><b>Expand here to view all instances of this
finding</b></summary><br/>
<div align="center">
| **File Path** | **Line Number** |
| ------------- | ------------- |
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1098](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1098)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1148](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1148)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1131](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1131)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1082](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1082)|
| zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java |
[1921](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java#L1921)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1154](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1154)|
|
zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java
|
[1139](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/ZooKeeperServer.java#L1139)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1395](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1395)|
| zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java |
[1401](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java#L1401)|
| zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java |
[2227](https://github.com/mobius-software-ltd/zookeeper/blob/155b3cbd7adee0bc92ce27c8c1a4688706c912d2/zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java#L2227)|
<p> Showing <b>10</b> of <b>21</b> findings. <a
href="https://lift.sonatype.com/results/github.com/apache/zookeeper/01GA1B5Z0GCXXPR0GMQ6HY5SSW?t=Infer|THREAD_SAFETY_VIOLATION"
target="_blank">Visit the Lift Web Console</a> to see all.</p></div></details>
---
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=312590195&lift_comment_rating=1)
] - [ [😕 Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=312590195&lift_comment_rating=2)
] - [ [😑 Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=312590195&lift_comment_rating=3)
] - [ [🙂 Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=312590195&lift_comment_rating=4)
] - [ [😊 Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=312590195&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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]