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

fix(stream): avoid committing to in-memory state store in join benchmark #20008

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Jan 3, 2025

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

What's changed and what's your intention?

If we commit to state store, we will end up measuring the memory consumption of writing the amplified chunks to the in-memory state store.
In production, state store is on top of object storage / disk. The in-memory state store is only used in benchmark / tests. So we shouldn't benchmark the memory consumption.

Further, the amplified chunks are not written in a large batch typically. The scenario we care about is OOM from dimension table update. In such a scenario, the fact table side's memory consumption will be high due to reads from the update side, rather than writes.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • My PR contains critical fixes that are necessary to be merged into the latest release.

Documentation

  • My PR needs documentation updates.
Release note

Copy link
Contributor Author

kwannoel commented Jan 3, 2025

@kwannoel kwannoel changed the title Avoid committing to state store fix(stream): avoid committing to in-memory state store in join benchmark Jan 3, 2025
@github-actions github-actions bot added type/fix Bug fix and removed Invalid PR Title labels Jan 3, 2025
@kwannoel kwannoel marked this pull request as ready for review January 3, 2025 02:21
@@ -854,9 +854,6 @@ pub mod hash_join_executor {
tx_r.push_chunk(chunk);
}

tx_l.push_barrier(test_epoch(2), false);
tx_r.push_barrier(test_epoch(2), false);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This second barrier will trigger a state store flush. Because the barrier before this is the initial barrier, it will not commit data to state store.

@kwannoel kwannoel mentioned this pull request Jan 4, 2025
8 tasks
@kwannoel kwannoel force-pushed the 01-03-avoid_committing_to_state_store branch from 6ec0064 to bb9b26a Compare January 6, 2025 07:48
@kwannoel kwannoel force-pushed the 01-03-avoid_committing_to_state_store branch from bb9b26a to 55c5044 Compare January 7, 2025 02:20
@kwannoel kwannoel mentioned this pull request Jan 7, 2025
8 tasks
@kwannoel kwannoel added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit cca7b5e Jan 7, 2025
30 of 31 checks passed
@kwannoel kwannoel deleted the 01-03-avoid_committing_to_state_store branch January 7, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants