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: add WAIT command #13027

Merged
merged 11 commits into from
Oct 25, 2023
Merged

feat: add WAIT command #13027

merged 11 commits into from
Oct 25, 2023

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Oct 24, 2023

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

What's changed and what's your intention?

Closes #12885

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • 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 kwannoel changed the title Kwannoel/wait feat: add WAIT command Oct 24, 2023
@TennyZhuang TennyZhuang requested a review from BugenZhao October 24, 2023 09:59
@kwannoel kwannoel requested a review from chenzl25 October 24, 2023 10:05
@kwannoel kwannoel marked this pull request as ready for review October 24, 2023 10:05
.is_empty()
{
sleep(Duration::from_secs(1)).await;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The wait logic.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #13027 (36e9bfe) into main (272eff4) will decrease coverage by 0.10%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main   #13027      +/-   ##
==========================================
- Coverage   68.69%   68.60%   -0.10%     
==========================================
  Files        1495     1496       +1     
  Lines      251161   251257      +96     
==========================================
- Hits       172546   172383     -163     
- Misses      78615    78874     +259     
Flag Coverage Δ
rust 68.60% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/sqlparser/src/keywords.rs 100.00% <ø> (ø)
src/frontend/src/handler/mod.rs 58.40% <0.00%> (-0.18%) ⬇️
src/sqlparser/src/ast/mod.rs 85.40% <0.00%> (-0.07%) ⬇️
src/sqlparser/src/parser.rs 87.51% <0.00%> (-0.03%) ⬇️
src/utils/pgwire/src/pg_response.rs 52.80% <0.00%> (-0.30%) ⬇️
src/frontend/src/meta_client.rs 0.00% <0.00%> (ø)
src/frontend/src/test_utils.rs 72.19% <0.00%> (-0.31%) ⬇️
src/meta/service/src/ddl_service.rs 0.00% <0.00%> (ø)
src/rpc_client/src/meta_client.rs 4.03% <0.00%> (-0.02%) ⬇️
src/frontend/src/handler/wait.rs 0.00% <0.00%> (ø)
... and 1 more

... and 18 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

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

Generally LGTM. Should we support canceling wait statement or set a maximum wait time to avoid a potential dead loop?

@kwannoel kwannoel enabled auto-merge October 25, 2023 01:54
@kwannoel kwannoel added this pull request to the merge queue Oct 25, 2023
Merged via the queue into main with commit 8221d3a Oct 25, 2023
8 of 9 checks passed
@kwannoel kwannoel deleted the kwannoel/wait branch October 25, 2023 04:35
@BugenZhao
Copy link
Member

Will this command be user-facing?

@BugenZhao
Copy link
Member

avoid a potential dead loop

It's not a big deal. The loop will be cancelled once the gRPC connection closes, that is, the frontend cancels the request.

@kwannoel
Copy link
Contributor Author

Will this command be user-facing?

Nope. Just for tests.

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.

Add WAIT for background_ddl tasks
3 participants