Skip to content

Commit 4b7cb87

Browse files
committed
spring-projectsGH-8699: Atomic Redis script for unlock()
Add a comment and fix checkstyle violations
1 parent d20796a commit 4b7cb87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-integration-redis/src/main/java/org/springframework/integration/redis/util/RedisLockRegistry.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ private void removeLockKey() {
478478
if (RedisLockRegistry.this.unlinkAvailable) {
479479
Boolean unlinkResult = null;
480480
try {
481+
// Attempt to UNLINK the lock key; an exception indicates lack of UNLINK support
481482
unlinkResult = removeLockKeyInnerUnlink();
482483
}
483484
catch (Exception ex) {
@@ -492,7 +493,8 @@ private void removeLockKey() {
492493
}
493494
}
494495

495-
if(Boolean.TRUE.equals(unlinkResult)) {
496+
if (Boolean.TRUE.equals(unlinkResult)) {
497+
// Lock key successfully unlinked
496498
return;
497499
}
498500
else if (Boolean.FALSE.equals(unlinkResult)) {

0 commit comments

Comments
 (0)