Skip to content

Commit

Permalink
Abstract out RemoteFsTranslogWithPinnedTimestamps
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Sep 2, 2024
1 parent 738cdd3 commit 7b9957c
Show file tree
Hide file tree
Showing 5 changed files with 528 additions and 298 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,36 @@ 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 RemoteFsTranslogWithPinnedTimestamps(
config,
translogUUID,
deletionPolicy,
globalCheckpointSupplier,
primaryTermSupplier,
persistedSequenceNumberConsumer,
blobStoreRepository,
threadPool,
startedPrimarySupplier,
remoteTranslogTransferTracker,
remoteStoreSettings,
0
);
} 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 7b9957c

Please sign in to comment.