Skip to content

Commit

Permalink
HDDS-11491. Avoid sharing clientId among deleting services (apache#7250)
Browse files Browse the repository at this point in the history
(cherry picked from commit c91f1c7)
  • Loading branch information
sumitagrawl authored and xichen01 committed Nov 13, 2024
1 parent ef5fe72 commit 981ff69
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public abstract class AbstractKeyDeletingService extends BackgroundService

private final OzoneManager ozoneManager;
private final ScmBlockLocationProtocol scmClient;
private static ClientId clientId = ClientId.randomId();
private final ClientId clientId = ClientId.randomId();
private final AtomicLong deletedDirsCount;
private final AtomicLong movedDirsCount;
private final AtomicLong movedFilesCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.hadoop.ozone.om.snapshot.ReferenceCounted;
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.PurgePathRequest;
import org.apache.hadoop.util.Time;
import org.apache.ratis.protocol.ClientId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -70,8 +69,6 @@ public class DirectoryDeletingService extends AbstractKeyDeletingService {
public static final Logger LOG =
LoggerFactory.getLogger(DirectoryDeletingService.class);

private static ClientId clientId = ClientId.randomId();

// Use only a single thread for DirDeletion. Multiple threads would read
// or write to same tables and can send deletion requests for same key
// multiple times.
Expand Down

0 comments on commit 981ff69

Please sign in to comment.