ibessonov commented on code in PR #4437:
URL: https://github.com/apache/ignite-3/pull/4437#discussion_r1773256445
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PersistentPageMemory.java:
##########
@@ -1865,32 +1908,28 @@ private void copyPageForCheckpoint(
// No need to write if exception occurred.
boolean canWrite = false;
- boolean locked = rwLock.tryWriteLock(absPtr + PAGE_LOCK_OFFSET,
TAG_LOCK_ALWAYS);
-
- if (!locked) {
- // We release the page only once here because this page will be
copied sometime later and
- // will be released properly then.
+ if (!rwLock.tryWriteLock(absPtr + PAGE_LOCK_OFFSET, TAG_LOCK_ALWAYS)) {
+ // We release the page only once here because this page will be
copied sometime later and will be released properly then.
Review Comment:
> Does it bother you a lot?
Yes, useless changes of a completely normal code bother me. The point of a
variable - it has a name. `if (!locked)` is easier to read, for example
--
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]