Skip to content

Commit

Permalink
Abstract out RemoteFsTranslogWithPinnedTimestamps (opensearch-project…
Browse files Browse the repository at this point in the history
…#15579) (opensearch-project#15636)

* Abstract out RemoteFsTranslog with pinned timestamps


(cherry picked from commit deeb2de)

Signed-off-by: Sachin Kale <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 39a4917 commit 3f95aa2
Show file tree
Hide file tree
Showing 5 changed files with 531 additions and 310 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,35 @@ public Translog newTranslog(

assert repository instanceof BlobStoreRepository : "repository should be instance of BlobStoreRepository";
BlobStoreRepository blobStoreRepository = ((BlobStoreRepository) repository);
return new RemoteFsTranslog(
config,
translogUUID,
deletionPolicy,
globalCheckpointSupplier,
primaryTermSupplier,
persistedSequenceNumberConsumer,
blobStoreRepository,
threadPool,
startedPrimarySupplier,
remoteTranslogTransferTracker,
remoteStoreSettings
);
if (RemoteStoreSettings.isPinnedTimestampsEnabled()) {
return new RemoteFsTimestampAwareTranslog(
config,
translogUUID,
deletionPolicy,
globalCheckpointSupplier,
primaryTermSupplier,
persistedSequenceNumberConsumer,
blobStoreRepository,
threadPool,
startedPrimarySupplier,
remoteTranslogTransferTracker,
remoteStoreSettings
);
} else {
return new RemoteFsTranslog(
config,
translogUUID,
deletionPolicy,
globalCheckpointSupplier,
primaryTermSupplier,
persistedSequenceNumberConsumer,
blobStoreRepository,
threadPool,
startedPrimarySupplier,
remoteTranslogTransferTracker,
remoteStoreSettings
);
}
}

public Repository getRepository() {
Expand Down
Loading

0 comments on commit 3f95aa2

Please sign in to comment.