Skip to content

Commit 9e8148c

Browse files
committed
docs(sqs): note PurgeQueue as a tombstone writer alongside DeleteQueue
The SqsQueueTombstonePrefix constant comment claimed only DeleteQueue wrote tombstones. As of 31a083f, PurgeQueue also writes one — the pre-bump-generation marker that lets the reaper find pre-purge orphans when DeleteQueue lands before the next reaper tick. Update the comment to record both writers and the invariant each preserves. No behavior change.
1 parent 31a083f commit 9e8148c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

adapter/sqs_keys.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ const (
3636
// can find every record whose retention deadline has elapsed with
3737
// one bounded scan, without having to load every message body.
3838
SqsMsgByAgePrefix = "!sqs|msg|byage|"
39-
// SqsQueueTombstonePrefix prefixes a "queue was deleted" marker.
40-
// DeleteQueue writes one (queue, gen) tombstone alongside the meta
41-
// delete, and the reaper enumerates these markers to clean up
42-
// orphan data / vis / byage / dedup / group keys whose meta row no
43-
// longer exists. The tombstone is itself deleted once the reaper
39+
// SqsQueueTombstonePrefix prefixes a generation-orphan marker.
40+
// DeleteQueue and PurgeQueue each write one (queue, gen) tombstone
41+
// in the same OCC transaction that supersedes that generation —
42+
// DeleteQueue tombstones the gen it removes the meta row at, and
43+
// PurgeQueue tombstones the pre-bump gen so the reaper can find
44+
// pre-purge orphans even if the queue is deleted before the next
45+
// reaper tick. The reaper enumerates these markers to clean up
46+
// orphan data / vis / byage / dedup / group keys for superseded
47+
// generations. The tombstone is itself deleted once the reaper
4448
// confirms no message-keyspace state remains for that (queue, gen).
4549
SqsQueueTombstonePrefix = "!sqs|queue|tombstone|"
4650
)

0 commit comments

Comments
 (0)