[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-08-08 Thread MichaelScofield
Github user MichaelScofield commented on the issue: https://github.com/apache/zookeeper/pull/584 @anmolnar Sorry for the late response. I think what @lvfangmin wants to put here, is that `createNode()` is called in single thread, so the race condition does not exist. **IF** there were

[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-08-08 Thread maoling
Github user maoling commented on the issue: https://github.com/apache/zookeeper/pull/584 sorry ,too embarrassed.I was wrong about my previous opinion. look at my thread-pool [unit test](https://github.com/maoling/zookeeper/blob/ZOOKEEPER-3102/src/java/test/org/apache/zookeeper/server/

[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-08-08 Thread anmolnar
Github user anmolnar commented on the issue: https://github.com/apache/zookeeper/pull/584 @MichaelScofield Would you please respond to @lvfangmin 's comment? If this change doesn't make creating ephemerals thread-safe, there's no value in committing it. ---

[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-07-29 Thread MichaelScofield
Github user MichaelScofield commented on the issue: https://github.com/apache/zookeeper/pull/584 @anmolnar Thanks for the `computeIfAbsent` suggestion. Modified codes accordingly. @breed @lvfangmin I'm aware that `createNode` is single-threaded, and the race condition I revealed i

[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-07-26 Thread lvfangmin
Github user lvfangmin commented on the issue: https://github.com/apache/zookeeper/pull/584 This is good enough to make the ephemerals thread safe in DataTree, if it's being called in multiple thread, the code you touched here may add ephemerals which is just removed in killSession.

[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-07-26 Thread breed
Github user breed commented on the issue: https://github.com/apache/zookeeper/pull/584 i'm not sure this is an issue. there is a single thread (FileRequestProcessor) that does all the mutations, so i don't think there is a race here. there might be a race in other places, but we need