Skip to content

Commit 8a901fa

Browse files
committed
revert dispose calls and elevate logging for LFBP dispose timeout
1 parent 42c5d0a commit 8a901fa

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

libs/common/Memory/LimitedFixedBufferPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public void Dispose()
220220
{
221221
var entryBufferType = (PoolEntryBufferType)(kvp.Key.source & 0xFF);
222222
var entryOwnerType = (PoolOwnerType)((kvp.Key.source >> 8) & 0xFF);
223-
logger?.LogError(" Unreturned buffer: ownerType={ownerType}, bufferType={bufferType}, size={size}",
223+
logger?.LogCritical(" Unreturned buffer: ownerType={ownerType}, bufferType={bufferType}, size={size}",
224224
entryOwnerType, entryBufferType, kvp.Key.entry.Length);
225225
}
226226
}

libs/common/Networking/GarnetTcpNetworkSender.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ public override void DisposeNetworkSender(bool waitForSendCompletion)
252252
// Wait for ongoing sends to complete
253253
while (throttleCount >= 0 && Interlocked.CompareExchange(ref throttleCount, int.MinValue, 0) != 0) Thread.Yield();
254254

255-
// Atomically take ownership of the current response object so it is
256-
// disposed together with the rest of the stack entries below.
257-
var obj = Interlocked.Exchange(ref responseObject, null);
258-
if (obj != null)
259-
ReturnBuffer(obj);
260-
261255
// Empty and dispose the stack
262256
saeaStack.Dispose();
263257

libs/common/Networking/TcpNetworkHandlerBase.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,6 @@ public override void Dispose()
170170
// Dispose of the socket to free up unmanaged resources
171171
socket.Dispose();
172172
}
173-
174-
// Ensure the handler is fully cleaned up: cancel CTS, remove from activeHandlers,
175-
// and return pool buffers. DisposeImpl is guarded by disposeCount so it is safe to
176-
// call even when the SAEA callback path has already invoked it.
177-
DisposeImpl();
178173
}
179174

180175
/// <summary>

0 commit comments

Comments
 (0)