Skip to content

Fair ordering for deferred deletion claims - #65

Draft
gciavarrini wants to merge 7 commits into
dcm-project:mainfrom
gciavarrini:deletion-claim-fairness
Draft

gciavarrini wants to merge 7 commits into
dcm-project:mainfrom
gciavarrini:deletion-claim-fairness

Conversation

@gciavarrini

Copy link
Copy Markdown
Contributor

⚠️ Depends on PR #64 ⚠️

ClaimPendingDeletions now prefers rows with no last_deletion_attempt over recently retried backlog rows, with deletion_requested_at as a deterministic tie-breaker.

Applies to both Postgres (SKIP LOCKED) and SQLite claim paths.
With 101+ SCHEDULED deletions, a newer row is claimed on the next cleanup cycle once the oldest 100 have been attempted.


Commits

This PR adds only 1 commit on top of #64:

  • 1315755 Prefer never-attempted rows in deletion claim ordering

Base PR #64 commit range is: d4acaff..6a4de20


Fixes

FLPATH-4866

DB-backed claiming with optimistic updates on SQLite and
SKIP LOCKED on Postgres.

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Second control-plane replica in compose.
assert one cleanup delete publish per scheduler tick across replicas.
Fail fast when the second replica is not reachable.

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Use compose profile ha so test-up stays single-replica. HA spec
brings cp2 up on demand, polls health, and stops it after.

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Do not clear deletion_claimed_until when recording a publish
attempt. Release claims on publish failure, lookup errors, and
cycle cancel so retries are not blocked for the full TTL

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Deprioritize recently retried SCHEDULED deletions via
last_deletion_attempt so newer backlog rows are not starved.
Add SQLite and Postgres fairness tests

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant