This is an automated email from the ASF dual-hosted git repository.
rpuch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 7d25de79af IGNITE-23099 Fix writeUnlock() contract in
VersatileReadWriteLock (#4305)
7d25de79af is described below
commit 7d25de79af05f7c5bd0155e83a6d7506b5997682
Author: Roman Puchkovskiy <[email protected]>
AuthorDate: Thu Aug 29 14:42:08 2024 +0400
IGNITE-23099 Fix writeUnlock() contract in VersatileReadWriteLock (#4305)
---
.../org/apache/ignite/internal/util/VersatileReadWriteLock.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/util/VersatileReadWriteLock.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/VersatileReadWriteLock.java
index a8829f9e54..540f26518b 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/util/VersatileReadWriteLock.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/util/VersatileReadWriteLock.java
@@ -346,9 +346,11 @@ public class VersatileReadWriteLock {
throw new IllegalMonitorStateException();
}
- boolean b = STATE_VH.compareAndSet(this, state, state(false,
readLocks));
-
- assert b;
+ while (true) {
+ if (STATE_VH.compareAndSet(this, state, state(false, readLocks))) {
+ break;
+ }
+ }
notifyWriteLockSolicitors();
notifyReadLockSolicitors();