Skip to content

Commit

Permalink
feat: add partitionId to FileBasedSnapshotStore context
Browse files Browse the repository at this point in the history
(cherry picked from commit b2d3737)
  • Loading branch information
Zelldon authored and github-actions[bot] committed Sep 24, 2021
1 parent 08819dd commit 926f824
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -30,6 +30,7 @@
import java.util.ConcurrentModificationException;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
Expand Down Expand Up @@ -64,6 +65,7 @@ public final class FileBasedSnapshotStore extends Actor
private final AtomicLong receivingSnapshotStartCount;
private final Set<PersistableSnapshot> pendingSnapshots = new HashSet<>();
private final String actorName;
private final int partitionId;

public FileBasedSnapshotStore(
final int nodeId,
Expand All @@ -78,6 +80,14 @@ public FileBasedSnapshotStore(

listeners = new CopyOnWriteArraySet<>();
actorName = buildActorName(nodeId, "SnapshotStore", partitionId);
this.partitionId = partitionId;
}

@Override
protected Map<String, String> createContext() {
final var context = super.createContext();
context.put(ACTOR_PROP_PARTITION_ID, Integer.toString(partitionId));
return context;
}

@Override
Expand Down

0 comments on commit 926f824

Please sign in to comment.