Skip to content

refactor(error): dedicated error type for dml crate #14768

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

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Conversation

BugenZhao
Copy link
Member

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

What's changed and what's your intention?

Introduce dedicated error type DmlError for dml crate, to clean-up the usage of anyhow and RwError. Also change the signature of StreamReaderWithPause to accept any streams that yields Err = StreamExecutorError instead of RwError.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

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.

@BugenZhao BugenZhao requested a review from chenzl25 January 24, 2024 07:21
@BugenZhao BugenZhao requested a review from a team as a code owner January 24, 2024 07:21
Comment on lines -51 to -53
/// Receive messages from the reader. Hang up on error.
#[try_stream(ok = M, error = StreamExecutorError)]
async fn data_stream(stream: BoxTryStream<M>) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks like a no-op for FusedStreams. So I removed it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also don't know why we need to do so before.

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.

LGTM

Copy link
Member

@stdrc stdrc left a comment

Choose a reason for hiding this comment

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

approve on behalf of cargo.lock

@BugenZhao BugenZhao added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit fa9e754 Jan 25, 2024
@BugenZhao BugenZhao deleted the bz/dml-error branch January 25, 2024 04:28
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