vlsi commented on code in PR #3845:
URL: https://github.com/apache/cassandra/pull/3845#discussion_r1935345749
##########
src/java/org/apache/cassandra/db/Keyspace.java:
##########
@@ -534,7 +534,7 @@ else if (isDeferrable)
}
}
- long acquireTime = currentTimeMillis() -
mutation.viewLockAcquireStart.get();
+ long acquireTime = currentTimeMillis() -
mutation.viewLockAcquireStart;
Review Comment:
Frankly, it sounds a bit odd to have both `plain` and
`AtomicLongFieldUpdater`-driven access at the same time. Does it really cost
much to have plain `mutation` read rather than
`Mutation.viewLockAcquireStartUpdater.get(mutation)` instead?
In theory, the underlying platform might fail to support atomic CAS for
long, so OpenJDK would resort to `synchronized...` for `compareAndSet`, thus it
would be somewhat invalid to use plain reads in those cases.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]