Attempt to have a minute grace whenever collection get removed.

This commit is contained in:
cake
2025-12-21 01:55:26 +01:00
parent 2a670b3e64
commit 7b74fa7c4e
6 changed files with 180 additions and 50 deletions

View File

@@ -194,9 +194,13 @@ public class Pair
{
var handler = TryGetHandler();
if (handler is null)
{
return PairDebugInfo.Empty;
}
var now = DateTime.UtcNow;
var dueAt = handler.VisibilityEvictionDueAtUtc;
var remainingSeconds = dueAt.HasValue
? Math.Max(0, (dueAt.Value - now).TotalSeconds)
: (double?)null;
return new PairDebugInfo(
true,
@@ -206,6 +210,9 @@ public class Pair
handler.LastDataReceivedAt,
handler.LastApplyAttemptAt,
handler.LastSuccessfulApplyAt,
handler.InvisibleSinceUtc,
handler.VisibilityEvictionDueAtUtc,
remainingSeconds,
handler.LastFailureReason,
handler.LastBlockingConditions,
handler.IsApplying,