From 005dd44919cdd25159bd5ad474eae6cc0d034996 Mon Sep 17 00:00:00 2001 From: Sebastian Burckhardt Date: Tue, 15 Feb 2022 15:07:17 -0800 Subject: [PATCH] do not remove ioPendingRequests in RMWAsync if there was no disk request --- cs/src/core/Async/RMWAsync.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cs/src/core/Async/RMWAsync.cs b/cs/src/core/Async/RMWAsync.cs index 0c1b0fd53..3a0f57d82 100644 --- a/cs/src/core/Async/RMWAsync.cs +++ b/cs/src/core/Async/RMWAsync.cs @@ -62,7 +62,10 @@ public bool CompletePendingIO(IFasterSession /// public void DecrementPending(FasterExecutionContext currentCtx, ref PendingContext pendingContext) { - currentCtx.ioPendingRequests.Remove(pendingContext.id); + if (!this.diskRequest.IsDefault()) + { + currentCtx.ioPendingRequests.Remove(pendingContext.id); + } currentCtx.asyncPendingCount--; currentCtx.pendingReads.Remove(); }