Skip to content

Commit

Permalink
Address build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
  • Loading branch information
shiv0408 committed Jun 11, 2024
1 parent 74b1086 commit 5697fab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class RemoteClusterStateCleanupManager implements Closeable {
private long lastCleanupAttemptStateVersion;
private final ThreadPool threadpool;
private final ClusterApplierService clusterApplierService;
private final RemoteManifestManager remoteManifestManager;
private RemoteManifestManager remoteManifestManager;

public RemoteClusterStateCleanupManager(RemoteClusterStateService remoteClusterStateService, ClusterService clusterService) {
this.remoteClusterStateService = remoteClusterStateService;
Expand All @@ -83,11 +83,11 @@ public RemoteClusterStateCleanupManager(RemoteClusterStateService remoteClusterS
// initialize with 0, a cleanup will be done when this node is elected master node and version is incremented more than threshold
this.lastCleanupAttemptStateVersion = 0;
clusterSettings.addSettingsUpdateConsumer(REMOTE_CLUSTER_STATE_CLEANUP_INTERVAL_SETTING, this::updateCleanupInterval);
remoteManifestManager = remoteClusterStateService.getRemoteManifestManager();
}

void start() {
staleFileDeletionTask = new AsyncStaleFileDeletion(this);
remoteManifestManager = remoteClusterStateService.getRemoteManifestManager();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ public void start() {
final Repository repository = repositoriesService.get().repository(remoteStoreRepo);
assert repository instanceof BlobStoreRepository : "Repository should be instance of BlobStoreRepository";
blobStoreRepository = (BlobStoreRepository) repository;
remoteClusterStateCleanupManager.start();
this.remoteRoutingTableService.start();
blobStoreTransferService = new BlobStoreTransferService(getBlobStore(), threadpool);
String clusterName = ClusterName.CLUSTER_NAME_SETTING.get(settings).value();
Expand All @@ -709,6 +708,7 @@ public void start() {
blobStoreTransferService,
threadpool
);
remoteClusterStateCleanupManager.start();
}

private void setSlowWriteLoggingThreshold(TimeValue slowWriteLoggingThreshold) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
public class RemoteIndexMetadata extends AbstractRemoteWritableBlobEntity<IndexMetadata> {

public static final int INDEX_METADATA_CURRENT_CODEC_VERSION = 1;
public static final int INDEX_METADATA_CURRENT_CODEC_VERSION = 2;

public static final ChecksumBlobStoreFormat<IndexMetadata> INDEX_METADATA_FORMAT = new ChecksumBlobStoreFormat<>(
"index-metadata",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void testDeleteClusterMetadata() throws IOException {
BlobContainer container = mock(BlobContainer.class);
when(blobStore.blobContainer(any())).thenReturn(container);
doNothing().when(container).deleteBlobsIgnoringIfNotExists(any());

remoteClusterStateCleanupManager.start();
remoteClusterStateCleanupManager.deleteClusterMetadata(clusterName, clusterUUID, activeBlobs, inactiveBlobs);
verify(container).deleteBlobsIgnoringIfNotExists(
List.of(
Expand Down

0 comments on commit 5697fab

Please sign in to comment.