diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index f9db896276..96e9a33ced 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -24,7 +24,7 @@ This release also updates downstream dependency versions. Most notably, the prot * **Bug fix** Fix 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) * **Bug fix** Fix 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) * **Bug fix** Fix 4 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) -* **Bug fix** Fix 5 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) +* **Bug fix** Failed no-ops no longer log at `ERROR` [(Issue #1692)](https://github.com/FoundationDB/fdb-record-layer/issues/1692) * **Performance** Improvement 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) * **Performance** Improvement 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) * **Performance** Improvement 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN) diff --git a/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBDatabase.java b/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBDatabase.java index 42353a8089..231dfa0626 100644 --- a/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBDatabase.java +++ b/fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/provider/foundationdb/FDBDatabase.java @@ -479,13 +479,6 @@ public FDBRecordContext openContext(@Nonnull FDBRecordContextConfig contextConfi return context; } - private void logNoOpFailure(@Nonnull Throwable err) { - if (LOGGER.isErrorEnabled()) { - LOGGER.error(KeyValueLogMessage.of("unable to perform no-op operation against fdb", - LogMessageKeys.CLUSTER, getClusterFile()), err); - } - } - /** * Perform a no-op against FDB to check network thread liveness. See {@link #performNoOp(Map, FDBStoreTimer)} * for more information. This will use the default MDC for running threads and will not instrument the @@ -551,17 +544,9 @@ public CompletableFuture performNoOpAsync(@Nullable Map md future = context.instrument(FDBStoreTimer.Events.PERFORM_NO_OP, future, startTime); } futureStarted = true; - return future.thenAccept(ignore -> { }).whenComplete((vignore, err) -> { - context.close(); - if (err != null) { - logNoOpFailure(err); - } - }); + return future.thenAccept(ignore -> { }).whenComplete((vignore, err) -> context.close()); } catch (RuntimeException e) { - logNoOpFailure(e); - CompletableFuture errFuture = new CompletableFuture<>(); - errFuture.completeExceptionally(e); - return errFuture; + return CompletableFuture.failedFuture(e); } finally { if (!futureStarted) { context.close();