rpuch commented on code in PR #1976:
URL: https://github.com/apache/ignite-3/pull/1976#discussion_r1180339199
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/util/LockHolder.java:
##########
@@ -36,7 +35,7 @@
class LockHolder<T extends Lock> {
private final T lock;
- private final AtomicInteger lockHolder = new AtomicInteger();
+ private int lockHoldersCount;
Review Comment:
To guarantee this, `compute()` probably does volatile writes, maybe with
some `synchronized`. So making the field `volatile` should not cost us anything
(everything is already paid), but it will make the code less assumptive (so
after a change, it will be more difficult to break it)
--
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]