Skip to content

Commit 27abafb

Browse files
fix(tables): skip pendingDeleteMask for bounded background deletes
The bounded-delete commit (f1ee3e9) persisted maxRows and omitted doomedCount but the pendingDeleteMask guard that makes it work was left uncommitted, so the shipped mask still hid every filter+cutoff match — over-hiding the rows beyond maxRows that the job never deletes (they vanished from reads until the job ended, then reappeared). Return no mask when maxRows is set: a bounded delete is eventually consistent (rows disappear as deleted), like a bounded update. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 65b12f2 commit 27abafb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/lib/table/rows/service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,11 @@ export async function pendingDeleteMask(table: TableDefinition): Promise<SQL | u
855855
if (!job?.payload) return undefined
856856
const scope = job.payload as TableDeleteJobPayload
857857

858+
// A bounded delete (explicit limit) deletes only the first `maxRows` matches, so the filter-based
859+
// mask — which hides every match — would over-hide the rows beyond the cap this job never touches.
860+
// Leave those reads unmasked; the bounded delete is eventually consistent like a bounded update.
861+
if (scope.maxRows !== undefined) return undefined
862+
858863
const doomedParts: SQL[] = []
859864
if (scope.filter && Object.keys(scope.filter).length > 0) {
860865
try {

0 commit comments

Comments
 (0)