From d3d6c560aede245e9faedb894268a3d0cd3774d1 Mon Sep 17 00:00:00 2001 From: Alex Robinson Date: Wed, 11 Feb 2026 15:24:55 +0000 Subject: [PATCH] Log periodically when deleteAll is called with an alarm still set This is a companion to the compatibility date being added in #6044, to gather more data on the prevalence of this happening. --- src/workerd/io/actor-cache.c++ | 6 ++++++ src/workerd/io/actor-sqlite.c++ | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/workerd/io/actor-cache.c++ b/src/workerd/io/actor-cache.c++ index 190b60b3c5a..ffb69137530 100644 --- a/src/workerd/io/actor-cache.c++ +++ b/src/workerd/io/actor-cache.c++ @@ -2056,6 +2056,12 @@ ActorCache::DeleteAllResults ActorCache::deleteAll(WriteOptions options, SpanPar evictOrOomIfNeeded(lock); } + KJ_IF_SOME(t, currentAlarmTime.tryGet()) { + if (t.time != kj::none) { + LOG_WARNING_PERIODICALLY("NOSENTRY deleteAll() called on ActorCache with an alarm still set"); + } + } + return DeleteAllResults{.backpressure = getBackpressure(), .count = kj::mv(result)}; } diff --git a/src/workerd/io/actor-sqlite.c++ b/src/workerd/io/actor-sqlite.c++ index 0eb72b6a95b..8d4b61b395e 100644 --- a/src/workerd/io/actor-sqlite.c++ +++ b/src/workerd/io/actor-sqlite.c++ @@ -767,6 +767,9 @@ ActorCacheInterface::DeleteAllResults ActorSqlite::deleteAll( // the metadata table, to try to match the behavior of ActorCache, which preserves the set alarm // when running deleteAll(). auto localAlarmState = metadata.getAlarm(); + if (localAlarmState != kj::none) { + LOG_WARNING_PERIODICALLY("NOSENTRY deleteAll() called on ActorSqlite with an alarm still set"); + } // deleteAll() cannot be part of a transaction because it deletes the database altogether. So, // we have to close our transactions or fail.