NVIDIA / NVIDIA/nvcf

Delete "instances_by_day" table

Open
#793 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.