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

refactor(storage): upgrade foyer to v0.9 #16869

Merged
merged 29 commits into from
Jun 3, 2024
Merged

refactor(storage): upgrade foyer to v0.9 #16869

merged 29 commits into from
Jun 3, 2024

Conversation

MrCroxx
Copy link
Contributor

@MrCroxx MrCroxx commented May 21, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Upgrade foyer to v0.9 .

foyer v0.9 refactored the disk cache implementation, provides lower latency with less memory usage.

TODO: Release foyer v0.9 and fulfill the change log and release docs. foyer-rs/foyer#512

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@MrCroxx MrCroxx self-assigned this May 21, 2024
@MrCroxx MrCroxx marked this pull request as ready for review May 21, 2024 08:45
@MrCroxx MrCroxx requested a review from a team as a code owner May 21, 2024 08:45
Copy link
Contributor

@Li0k Li0k left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR

@MrCroxx
Copy link
Contributor Author

MrCroxx commented May 23, 2024

@wangrunji0408
Copy link
Contributor

Could madsim export Handle?

Let me add it... Before it is available, you can workaround it with #[cfg(not(madsim))]. 🤪

@MrCroxx
Copy link
Contributor Author

MrCroxx commented May 27, 2024

THAMK YE, @wangrunji0408 .

Copy link
Collaborator

@hzxa21 hzxa21 left a comment

Choose a reason for hiding this comment

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

LGTM

panels.timeseries_count(
"Refill Queue Length",
panels.timeseries_latency(
"Storage Cache Inner Op Duration",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is "Inner Op"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some unexported but essential operations to monitor. Like batch leader/follower queue time and queue rotation duration.

FYI https://github.com/MrCroxx/foyer/blob/main/foyer-common/src/metrics.rs#L118-L125

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you include it as a metric description in L2631?

Cargo.toml Outdated
@@ -76,7 +76,8 @@ license = "Apache-2.0"
repository = "https://github.com/risingwavelabs/risingwave"

[workspace.dependencies]
foyer = { version = "0.8.6", features = ["nightly"] }
# foyer = { version = "0.9", features = ["nightly"] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we will wait for the foyer new release before merging this PR?

Copy link
Contributor Author

@MrCroxx MrCroxx May 28, 2024

Choose a reason for hiding this comment

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

Yep. I'm waiting for this PR to be approved. If there is any need to modify foyer, I can fix it and release a new minor version.

@MrCroxx MrCroxx enabled auto-merge June 3, 2024 05:15
@MrCroxx MrCroxx disabled auto-merge June 3, 2024 05:16
@MrCroxx MrCroxx enabled auto-merge June 3, 2024 05:16
@MrCroxx MrCroxx added this pull request to the merge queue Jun 3, 2024
Merged via the queue into main with commit af1c1ea Jun 3, 2024
28 of 29 checks passed
@MrCroxx MrCroxx deleted the xx/f9 branch June 3, 2024 06:11
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.

4 participants