Skip to content

Commit

Permalink
Segment Replication - Remove unnecessary call to markAllocationIdAsIn…
Browse files Browse the repository at this point in the history
…Sync. (#4224)

This PR Removes an unnecessary call to markAllocationIdAsInSync on the primary shard when replication events complete.
Recovery will manage this initial call.

Signed-off-by: Marc Handalian <[email protected]>

Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 authored Aug 16, 2022
1 parent a081f2f commit 280b938
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,6 @@ public synchronized void sendFiles(GetSegmentFilesRequest request, ActionListene
transfer.start();

sendFileStep.whenComplete(r -> {
final String targetAllocationId = request.getTargetAllocationId();
RunUnderPrimaryPermit.run(
() -> shard.markAllocationIdAsInSync(targetAllocationId, request.getCheckpoint().getSeqNo()),
shard.shardId() + " marking " + targetAllocationId + " as in sync",
shard,
cancellableThreads,
logger
);
try {
future.onResponse(new GetSegmentFilesResponse(List.of(storeFileMetadata)));
} finally {
Expand Down

0 comments on commit 280b938

Please sign in to comment.