oxidecomputer / oxidecomputer/omicron

`saga` + `saga_node_event` tables are never garbage collected, but they should be

Open
#6,635 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

important non-blocker
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

In the spirit of https://github.com/oxidecomputer/omicron/issues/6615 , I looked at SHOW TABLES on dogfood to see where we have high-volume tables that are missing garbage collection.

In addition to the issue reported by #6615, I noticed the following tables have unusually high row counts:

  public      | saga                                              | table    | root  |             2555404 | NULL                                                                                                                              
  public      | saga_node_event                                   | table    | root  |            55688221 | NULL

I think this is "expected, but also bad". We should have a mechanism to garbage collect the tens of millions of saga events that have been created, rather than holding onto them and wasting disk space in perpetuity.

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 reading issue #6615 and examining how the saga and saga_node_event tables are created and used. Determine the retention boundary and garbage-collection mechanism, then verify that old saga events no longer accumulate while required saga data remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.