Skip to content

Commit

Permalink
nit: type FUture to Future
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-campagna committed Dec 12, 2024
1 parent d8b06f6 commit e88fdff
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected RestChannelConsumer prepareRequest(final RestRequest restRequest, fina
final var pollTimeout = restRequest.paramAsTime(POLL_TIMEOUT_PARAM_NAME, DEFAULT_POLL_TIMEOUT);
final var maxOperationsCount = restRequest.paramAsInt(MAX_OPERATIONS_COUNT_PARAM_NAME, DEFAULT_MAX_OPERATIONS_COUNT);

final CompletableFuture<String> indexUUIDCompletableFUture = asyncGetIndexUUID(
final CompletableFuture<String> indexUUIDCompletableFuture = asyncGetIndexUUID(
client,
indexName,
client.threadPool().executor(Ccr.CCR_THREAD_POOL_NAME)
Expand All @@ -100,9 +100,9 @@ protected RestChannelConsumer prepareRequest(final RestRequest restRequest, fina
client.threadPool().executor(Ccr.CCR_THREAD_POOL_NAME)
);

return channel -> CompletableFuture.allOf(indexUUIDCompletableFUture, shardStatsCompletableFuture).thenRun(() -> {
return channel -> CompletableFuture.allOf(indexUUIDCompletableFuture, shardStatsCompletableFuture).thenRun(() -> {
try {
final String indexUUID = indexUUIDCompletableFUture.get(DEFAULT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
final String indexUUID = indexUUIDCompletableFuture.get(DEFAULT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
final ShardStats shardStats = shardStatsCompletableFuture.get(DEFAULT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
final ShardId shardId = shardStats.getShardRouting().shardId();
final String expectedHistoryUUID = shardStats.getCommitStats().getUserData().get(Engine.HISTORY_UUID_KEY);
Expand Down

0 comments on commit e88fdff

Please sign in to comment.