Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/backend/distributed/operations/shard_cleaner.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,10 +1192,14 @@ CleanupRecordExists(uint64 recordId)
ScanKeyInit(&scanKey[0], Anum_pg_dist_cleanup_record_id,
BTEqualStrategyNumber, F_INT8EQ, Int64GetDatum(recordId));

/* make sure we can always see deletion after acquiring the operation ID lock */
Copy link
Copy Markdown
Contributor

@colm-mchugh colm-mchugh May 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comment format strays from convention. Maybe add this text to the function comment at line 1179 ?

Snapshot snapshot = GetLatestSnapshot();

SysScanDesc scanDescriptor = systable_beginscan(pgDistCleanup,
DistCleanupPrimaryKeyIndexId(),
indexOK,
NULL, scanKeyCount, scanKey);
snapshot,
scanKeyCount, scanKey);

HeapTuple heapTuple = systable_getnext(scanDescriptor);
bool recordExists = HeapTupleIsValid(heapTuple);
Expand Down
Loading