Delete "instances_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 instances ADD creation_ts timestamp;
CREATE CUSTOM INDEX idx_instances_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 instances 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 instances_by_day schema and the cleanup executors, then trace how instances are written with create_timeuuid. Review the proposed creation_ts index, backfill and dual-write steps, followed by the period scans. Done means range queries and main-table cleanup scans replace the old table and instances_by_day is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cassandra, go
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100