Skip to content

Commit d3d6c56

Browse files
committed
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.
1 parent 9a08d8e commit d3d6c56

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/workerd/io/actor-cache.c++

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,12 @@ ActorCache::DeleteAllResults ActorCache::deleteAll(WriteOptions options, SpanPar
20562056
evictOrOomIfNeeded(lock);
20572057
}
20582058

2059+
KJ_IF_SOME(t, currentAlarmTime.tryGet<KnownAlarmTime>()) {
2060+
if (t.time != kj::none) {
2061+
LOG_WARNING_PERIODICALLY("NOSENTRY deleteAll() called on ActorCache with an alarm still set");
2062+
}
2063+
}
2064+
20592065
return DeleteAllResults{.backpressure = getBackpressure(), .count = kj::mv(result)};
20602066
}
20612067

src/workerd/io/actor-sqlite.c++

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,9 @@ ActorCacheInterface::DeleteAllResults ActorSqlite::deleteAll(
767767
// the metadata table, to try to match the behavior of ActorCache, which preserves the set alarm
768768
// when running deleteAll().
769769
auto localAlarmState = metadata.getAlarm();
770+
if (localAlarmState != kj::none) {
771+
LOG_WARNING_PERIODICALLY("NOSENTRY deleteAll() called on ActorSqlite with an alarm still set");
772+
}
770773

771774
// deleteAll() cannot be part of a transaction because it deletes the database altogether. So,
772775
// we have to close our transactions or fail.

0 commit comments

Comments
 (0)