You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/08/28 22:44:56 UTC

[maven-resolver] 01/02: [MRESOLVER-190] [Regression] Revert MRESOLVER-184

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git

commit e8fb972b1e6bed5c0873a9f9277a5ceff50f8d5c
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Aug 28 20:52:47 2021 +0200

    [MRESOLVER-190] [Regression] Revert MRESOLVER-184
    
    Never delete semaphores from Redis because other Maven processes might
    use it which leads to concurrency issues and build failures.
---
 .../aether/named/redisson/RedissonSemaphoreNamedLockFactory.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/maven-resolver-named-locks-redisson/src/main/java/org/eclipse/aether/named/redisson/RedissonSemaphoreNamedLockFactory.java b/maven-resolver-named-locks-redisson/src/main/java/org/eclipse/aether/named/redisson/RedissonSemaphoreNamedLockFactory.java
index 73c538a..8d393ae 100644
--- a/maven-resolver-named-locks-redisson/src/main/java/org/eclipse/aether/named/redisson/RedissonSemaphoreNamedLockFactory.java
+++ b/maven-resolver-named-locks-redisson/src/main/java/org/eclipse/aether/named/redisson/RedissonSemaphoreNamedLockFactory.java
@@ -65,7 +65,9 @@ public class RedissonSemaphoreNamedLockFactory
         {
             throw new IllegalStateException( "Semaphore expected but does not exist: " + name );
         }
-        semaphore.delete();
+        /* Threre is no reasonable way to destroy the semaphore in Redis because we cannot know
+         * when the last process has stopped using it.
+         */
     }
 
     private static final class RedissonSemaphore implements AdaptedSemaphoreNamedLock.AdaptedSemaphore