Skip to content

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Sep 11, 2024

Description

Add support to override epoch retention for individual tables. This can be passed from the command line.
It only supports partitioned table today. For non-partitioned tables it will take some wiring to make it work and not urgent. We need this today mainly to prune the objects_history table more aggressively.

Test plan

CI


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 3:58am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 25, 2024 3:58am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 25, 2024 3:58am
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 25, 2024 3:58am

Copy link
Contributor

@wlmyng wlmyng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:customization:

bmwill
bmwill previously requested changes Sep 11, 2024
Comment on lines 15 to 17
lazy_static! {
static ref DEFAULT_EPOCHS_OVERRIDES: HashMap<&'static str, u64> = {
let mut m = HashMap::new();
m.insert("objects_history", 2);
m
};
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use LazyCell instead of lazy_static

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid the global and instead pass this config info through?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do that too in this PR. Here we provide a few defaults overrides.
I think if we could change our config strategy to a file instead of command line args, it would be a lot easier to move this fully to configs.

@bmwill
Copy link
Contributor

bmwill commented Sep 11, 2024

Is this still safe to do without a watermark table to track the available ranges for each table group?

@lxfind
Copy link
Contributor Author

lxfind commented Sep 11, 2024

Is this still safe to do without a watermark table to track the available ranges for each table group?

Good question. @wlmyng If we have a different pruning retention for objects_history table than other tables, would that break anything?

@lxfind lxfind force-pushed the indexer-add-table-specific-prune-config branch from f7d5b68 to 1066c19 Compare September 13, 2024 17:12
@lxfind lxfind changed the title [Indexer] Support per-table pruning retention [Indexer] Support 2-day retention for objects_history table Sep 13, 2024
@lxfind lxfind requested review from bmwill and wlmyng September 13, 2024 17:12
@lxfind lxfind mentioned this pull request Sep 25, 2024
8 tasks
Copy link
Contributor

@gegaowp gegaowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good, let's make sure that the alternative table(s) are ready on tnt and mnt when this change is rolled out.

@lxfind lxfind force-pushed the indexer-add-table-specific-prune-config branch from 1066c19 to 3939548 Compare September 25, 2024 03:50
@lxfind lxfind dismissed bmwill’s stale review September 25, 2024 03:50

Addressed feedback

@lxfind lxfind enabled auto-merge (squash) September 25, 2024 03:50
@lxfind lxfind force-pushed the indexer-add-table-specific-prune-config branch from 3939548 to d506e7d Compare September 25, 2024 03:50
@lxfind lxfind merged commit fd5a052 into main Sep 25, 2024
48 checks passed
@lxfind lxfind deleted the indexer-add-table-specific-prune-config branch September 25, 2024 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants