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

feat(meta): support commit epoch on multiple graphs at once #18819

Merged
merged 14 commits into from
Oct 16, 2024

Conversation

wenym1
Copy link
Contributor

@wenym1 wenym1 commented Oct 9, 2024

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

What's changed and what's your intention?

Global streaming graph and the creating streaming jobs will call commit_epoch on hummock manager to commit the newly added data and bump the committed epoch. State table ids of newly created job will also be registered to hummock version via the commit_epoch. commit_epoch must be called one by one, and should not be called concurrently.

Previously, global streaming graph and each individual creating streaming job calls commit_epoch separately one by one. Therefore, even though both global streaming graph and some creating jobs have new epoch to commit, they should do the commit_epoch one by one. This is due to the limitation of the commit_epoch, in which we should specify a single unified epoch, and the state table ids to bump the committed epoch to this specified epoch. However, creating jobs have an epoch lagging behind the global streaming graph, and cannot do commit_epoch with the global streaming graph due to the different epoch.

In this PR, we change the commit_epoch to support bumping the committed epoch of different state table ids to different epoch. In this way, the global streaming graph can call commit_epoch together with the creating streaming jobs. We also update the GlobalBarrierManager to call commit_epoch for both global streaming graph and creating jobs together when they both have data ready to commit.

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.

@kwannoel
Copy link
Contributor

Please provide more elaboration in the PR's description, need more clarification.

Support commit epoch for multiple graphs at once.

Do you mean multiple graphs, each with different epochs can be committed together? And previously on graphs with the same epoch can be committed together?

Different graphs can have different committed epoch, and newly added table ids from multiple streaming jobs can be added together all at once.

Could you elaborate on this? Is "different graphs" in reference to the distinct graph corresponding to each streaming job?
And what do you mean by "newly added table ids from multiple streaming jobs can be added together". Where will they be added to?

When upstream and creating jobs have data to commit at the same time, they can call commit epoch together in a single run.

What do you mean by "at the same time". Do you mean that for different epochs, all their barriers are collected. E.g. epoch A and epoch B all barriers from A are collected within some stream job, all barriers from B are collected within some stream job.
And it just happens to line up when meta is attempting to commit barriers. Then both A and B can be committed in that step?

@wenym1
Copy link
Contributor Author

wenym1 commented Oct 10, 2024

Please provide more elaboration in the PR's description, need more clarification.

Support commit epoch for multiple graphs at once.

Do you mean multiple graphs, each with different epochs can be committed together? And previously on graphs with the same epoch can be committed together?

Different graphs can have different committed epoch, and newly added table ids from multiple streaming jobs can be added together all at once.

Could you elaborate on this? Is "different graphs" in reference to the distinct graph corresponding to each streaming job? And what do you mean by "newly added table ids from multiple streaming jobs can be added together". Where will they be added to?

When upstream and creating jobs have data to commit at the same time, they can call commit epoch together in a single run.

What do you mean by "at the same time". Do you mean that for different epochs, all their barriers are collected. E.g. epoch A and epoch B all barriers from A are collected within some stream job, all barriers from B are collected within some stream job. And it just happens to line up when meta is attempting to commit barriers. Then both A and B can be committed in that step?

Just updated the PR description.

Copy link

gitguardian bot commented Oct 14, 2024

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9425213 Triggered Generic Password 604b5b6 e2e_test/source/tvf/postgres_query.slt View secret
9425213 Triggered Generic Password 604b5b6 e2e_test/source/tvf/postgres_query.slt View secret
9425213 Triggered Generic Password 1b013f1 ci/scripts/e2e-source-test.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Contributor

@zwang28 zwang28 left a comment

Choose a reason for hiding this comment

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

LGTM

@wenym1 wenym1 added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 6602113 Oct 16, 2024
31 of 34 checks passed
@wenym1 wenym1 deleted the yiming/commit-multi-graph-together branch October 16, 2024 06:43
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.

3 participants