From 2776648268d6b8f09acddfaf31c1067d478d3d7a Mon Sep 17 00:00:00 2001 From: Ian Shim <100327837+ian-shim@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:03:32 -0700 Subject: [PATCH] Upgrade lock for delete encoding request (#357) --- disperser/batcher/encoded_blob_store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disperser/batcher/encoded_blob_store.go b/disperser/batcher/encoded_blob_store.go index f8aeaf8d1..bdf56f8bb 100644 --- a/disperser/batcher/encoded_blob_store.go +++ b/disperser/batcher/encoded_blob_store.go @@ -81,8 +81,8 @@ func (e *encodedBlobStore) HasEncodingRequested(blobKey disperser.BlobKey, quoru } func (e *encodedBlobStore) DeleteEncodingRequest(blobKey disperser.BlobKey, quorumID core.QuorumID) { - e.mu.RLock() - defer e.mu.RUnlock() + e.mu.Lock() + defer e.mu.Unlock() requestID := getRequestID(blobKey, quorumID) if _, ok := e.requested[requestID]; !ok {