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

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

commit 78b47e36307ec7fc050499f8bba358cde4ce1736
Author: Michael Osipov <[email protected]>
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..159dd1f 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 is.
+         */
     }
 
     private static final class RedissonSemaphore implements 
AdaptedSemaphoreNamedLock.AdaptedSemaphore

Reply via email to