Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
Signed-off-by: Himshikha Gupta <[email protected]>
  • Loading branch information
Himshikha Gupta committed Sep 23, 2024
1 parent 1948321 commit 1b5edaa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,8 @@ public ClusterStateChecksum(ClusterState clusterState) {
} catch (InterruptedException e) {
throw new RemoteStateTransferException("Failed to create checksum for cluster state.", e);
}
logger.info("checksum execution time {}", System.currentTimeMillis() - start);

createClusterStateChecksum();

logger.debug("Checksum execution time {}", System.currentTimeMillis() - start);
}

private void executeChecksumTask(Function<BufferedChecksumStreamOutput, Void> checksumTask, Consumer<Long> checksumConsumer, ExecutorService executorService, CountDownLatch latch) {
Expand All @@ -199,10 +197,9 @@ private void executeChecksumTask(Function<BufferedChecksumStreamOutput, Void> ch
checksumConsumer.accept(checksum);
latch.countDown();
} catch (IOException e) {
throw new RuntimeException(e);
}git
throw new RemoteStateTransferException("Failed to execute checksum task", e);
}
});

}

private long createChecksum(Function<BufferedChecksumStreamOutput, Void> o) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public class RemoteClusterStateService implements Closeable {

public static final Setting<RemoteClusterStateValidationMode> REMOTE_CLUSTER_STATE_CHECKSUM_VALIDATION_MODE_SETTING = new Setting<>(
"cluster.remote_store.state.checksum_validation.mode",
RemoteClusterStateValidationMode.FAILURE.name(),
RemoteClusterStateValidationMode.NONE.name(),
RemoteClusterStateValidationMode::parseString,
Setting.Property.Dynamic,
Setting.Property.NodeScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ RemoteClusterStateManifestInfo uploadManifest(
boolean committed,
int codecVersion
) {
logger.info("checksum created {}", clusterStateChecksum);
synchronized (this) {
ClusterMetadataManifest.Builder manifestBuilder = ClusterMetadataManifest.builder();
manifestBuilder.clusterTerm(clusterState.term())
Expand Down

0 comments on commit 1b5edaa

Please sign in to comment.