From 6c746843ac0c1b273329ae400ce823f491d71390 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 30 Aug 2024 19:26:49 -0700 Subject: [PATCH] fix: keep locks on same pool for simplicity (#20356) locks handed by different pools would become non-compete for multi-object delete request, this is wrong for obvious reasons. New locking implementation and revamp will rewrite multi-object lock anyway, this is a workaround for now. --- cmd/erasure-server-pool.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index 5db7ce562..db0e8b00e 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -220,11 +220,7 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ } func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocker { - poolID := hashKey(z.distributionAlgo, "", len(z.serverPools), z.deploymentID) - if len(objects) >= 1 { - poolID = hashKey(z.distributionAlgo, objects[0], len(z.serverPools), z.deploymentID) - } - return z.serverPools[poolID].NewNSLock(bucket, objects...) + return z.serverPools[0].NewNSLock(bucket, objects...) } // GetDisksID will return disks by their ID.