Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tiered Storage] Replace penultimate naming with proximal #13460

Closed

Conversation

jaykorean
Copy link
Contributor

@jaykorean jaykorean commented Mar 12, 2025

Summary

With generalized age-based tiering (work-in-progress), the "warm tier" data will no longer necessarily be placed in the second-to-last level (also known as the "penultimate level").

Also, the cold tier may no longer necessarily be at the last level, so we need to rename options like preclude_last_level_seconds to preclude_cold_tier_seconds, but renaming options is trickier because it can be a breaking change for consuming applications. We will do this later as a follow up.

Minor fix included: Fixed one use-after-move in CompactionPicker

Test Plan

CI

@jaykorean jaykorean requested review from pdillinger and cbi42 March 12, 2025 19:35
@jaykorean jaykorean marked this pull request as ready for review March 12, 2025 19:38
@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jaykorean has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jaykorean has updated the pull request. You must reimport the pull request before landing.

input_file.level = 0;
input_file.index = i;
smallest_key_priority_q.push(std::move(input_file));
smallest_key_priority_q.emplace(c->input(0, i), 0, i);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Meta internal linter was complaining about the use-after-move. Please let me know if I should do this in a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine

@jaykorean jaykorean force-pushed the rename_penultimate_to_proximal branch from 13a2afc to 93328ff Compare March 12, 2025 20:53
@facebook-github-bot
Copy link
Contributor

@jaykorean has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jaykorean jaykorean force-pushed the rename_penultimate_to_proximal branch from 93328ff to 00250e1 Compare March 12, 2025 21:13
@facebook-github-bot
Copy link
Contributor

@jaykorean has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@jaykorean has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

input_file.level = 0;
input_file.index = i;
smallest_key_priority_q.push(std::move(input_file));
smallest_key_priority_q.emplace(c->input(0, i), 0, i);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine

@@ -215,8 +215,8 @@ TEST_F(TieredCompactionTest, SequenceBasedTieredStorageUniversal) {
}
ASSERT_OK(dbfull()->TEST_WaitForCompact());

// the penultimate level file temperature is not cold, all data are output to
// the penultimate level.
// the proximal level file temperature is not cold, all data are output to
Copy link
Contributor

Choose a reason for hiding this comment

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

In my mind, "proximal" makes sense relative to the primary/normal output level of a compaction: it's the level before it. It doesn't really make sense in absolute terms. The penultimate level is the proximal level to the last level. I think "penultimate" still makes sense for cases in this file that are referring specifically to the next-to-last level, instead of to compaction things outside this file.

Not a big deal

@facebook-github-bot
Copy link
Contributor

@jaykorean merged this pull request in ca7367a.

@jaykorean jaykorean deleted the rename_penultimate_to_proximal branch March 14, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants