Concurrent orphan scans can share scratch tables and report valid objects as orphans
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- aws, postgresql, typescript
Research direction
Read the scanner and cleanup paths that derive scratch table names from Date.now(), then inspect the linked regression test for concurrent scans of different buckets. Confirm both paths avoid collisions when timestamps match and that the test no longer reports another bucket’s valid S3 object as an orphan.
Written by the indexing model from the issue text.
Description
Problem
Concurrent object scans that start within the same millisecond can reuse the same PostgreSQL scratch-table name. Their S3 keys are then mixed, and one scan can report a valid object from another bucket as an orphan. The cleanup path uses the same timestamp-only naming pattern.
Reproduction
A deterministic regression test fixes Date.now() to the same value for two concurrent scans of different buckets. On upstream, one scan includes the other bucket’s valid S3 object in its orphan results.
Root cause
Both scanner paths derive unlogged scratch-table names from Date.now() alone. The table is shared by database clients, so simultaneous scans collide.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 319
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 106
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/storage
-
S3 CreateBucket returns BucketAlreadyExists for a bucket the project already ownsPossibly taken @ferhatelmas claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
supabase/storage#1656 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
The sample application in storage article points to wrong URLMay be free again @prasadf18 claimed this 211 days ago, and no pull request is open. Opendocumentation
Difficulty 1/5 Under an hour Newbie friendliness 62/100
supabase/storage#557 · 1 comment ·
Maintainers usually reply within 1 day
-
TUS uploads ignore a bucket file_size_limit of 0Possibly taken @hsusul claimed this 2 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Deleting a single object leaves its TUS .info sidecar in the S3 backendPossibly taken @hsusul claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
REST downloads from the S3 backend drop ETag and Cache-Control on 304 responsesPossibly taken @hsusul claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in supabase/storage
Similar issues
-
Add: ESP 2 ROOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't applyPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wso2/integration-control-plane#1118 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UTDNebula/utd-notebook#311 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day