Skip to content

Commit 89d0263

Browse files
committed
thenApply -> whenComplete
1 parent 7c4fbef commit 89d0263

File tree

1 file changed

+1
-3
lines changed
  • fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb

1 file changed

+1
-3
lines changed

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/IndexingBase.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ private CompletableFuture<Boolean> markIndexReadableSingleTarget(Index index, At
342342
})
343343
).handle((changed, ex) -> {
344344
if (ex == null) {
345-
heartbeat = null; // Here: all heartbeats were successfully cleared withing the set readable transactions. No need to clear again.
346345
if (Boolean.TRUE.equals(changed)) {
347346
anythingChanged.set(true);
348347
}
@@ -1028,11 +1027,10 @@ public CompletableFuture<Void> rebuildIndexAsync(@Nonnull FDBRecordStore store)
10281027
}))
10291028
.thenCompose(vignore -> setIndexingTypeOrThrow(store, false))
10301029
.thenCompose(vignore -> rebuildIndexInternalAsync(store))
1031-
.thenApply(vignore -> {
1030+
.whenComplete((ignore, ignoreEx) -> {
10321031
for (Index index: common.getTargetIndexes()) {
10331032
clearHeartbeatSingleTarget(store, index);
10341033
}
1035-
return null;
10361034
});
10371035
}
10381036

0 commit comments

Comments
 (0)