Delete "requests_by_day" table
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 218
- Forks
- 72
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 427
Description
Description
Add additional columns, indexes to instances table and adjust code to use single table.
Details
-
Step 1 - Update DB:
ALTER TABLE requests ADD creation_ts timestamp;
CREATE CUSTOM INDEX idx_requests_by_creation_ts ON instances (creation_ts) USING 'StorageAttachedIndex';
Backfill from create_timeuuid, dual-write during rollout.
-
Step 2 - Period scans become range queries:
SELECT ... FROM requests WHERE creation_ts >= ? AND creation_ts < ?;
-
Step 3 - rewrite the cleanup executors as main-table scans
-
Step 4 - clean up
Contributor 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.
Research direction
Start by locating the requests_by_day table references, the requests table access, and the cleanup executors described in the issue. Trace the period scans and rollout behavior before changing the schema and code; done means requests use creation_ts range queries, cleanup scans the main table, and the old table is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100