Skip to content

Commit

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

* Abstract out RemoteFsTranslog with pinned timestamps

Signed-off-by: Sachin Kale <kalsac@amazon.com>
  • Loading branch information
sachinpkale authored and akolarkunnu committed Sep 10, 2024
1 parent aa0e691 commit d3fa2bc
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 d3fa2bc

Please sign in to comment.