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(sink): support different default sink decouple for different sink #12544

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

wenym1
Copy link
Contributor

@wenym1 wenym1 commented Sep 26, 2023

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

What's changed and what's your intention?

In this PR, we support specifying the default sink_decouple of each sink. Currently the default sink decouple of all sinks is false. In the original sink_decouple session variable, its default value becomes default, which means that it will adopt the default sink decouple of the sink itself. The variable can be set true or enable to enable sink decouple for all sinks created in the session or false and disable to disable it regardless of the default sink decouple.

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.

@wenym1 wenym1 added the user-facing-changes Contains changes that are visible to users label Sep 26, 2023
@wenym1 wenym1 requested a review from hzxa21 September 26, 2023 11:02
@wenym1 wenym1 requested review from tabVersion and st1page October 7, 2023 04:46
@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

Merging #12544 (4af52ff) into main (fb6691a) will decrease coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 36.92%.

@@            Coverage Diff             @@
##             main   #12544      +/-   ##
==========================================
- Coverage   69.43%   69.42%   -0.01%     
==========================================
  Files        1481     1482       +1     
  Lines      242791   242849      +58     
==========================================
+ Hits       168573   168608      +35     
- Misses      74218    74241      +23     
Flag Coverage Δ
rust 69.42% <36.92%> (-0.01%) ⬇️

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

Files Coverage Δ
src/common/src/session_config/mod.rs 29.51% <100.00%> (ø)
src/connector/src/sink/kafka.rs 31.40% <100.00%> (+0.47%) ⬆️
src/connector/src/sink/mod.rs 60.00% <100.00%> (+0.87%) ⬆️
src/frontend/src/handler/create_sink.rs 68.16% <100.00%> (ø)
src/frontend/src/handler/drop_sink.rs 87.23% <100.00%> (ø)
src/stream/src/from_proto/sink.rs 0.00% <ø> (ø)
...rc/frontend/src/optimizer/plan_node/stream_sink.rs 77.96% <52.00%> (-2.26%) ⬇️
src/common/src/session_config/sink_decouple.rs 3.33% <3.33%> (ø)

... and 2 files with indirect coverage changes

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

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.

Left a question. Rest LGTM

"have checked connector is contained when create the `StreamSink`"
).to_lowercase().as_str(),
SinkTypeName,
SinkTypeName::default_sink_decouple(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the plan to change this to let different sink's implementation to specify whether sink decouple is enabled in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. In the future different sinks will have different default sink decouple setting.

Copy link
Contributor

@tabVersion tabVersion left a comment

Choose a reason for hiding this comment

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

lgtm, good work

@wenym1 wenym1 enabled auto-merge October 10, 2023 15:21
@wenym1 wenym1 added this pull request to the merge queue Oct 10, 2023
Merged via the queue into main with commit f5b750f Oct 10, 2023
11 of 12 checks passed
@wenym1 wenym1 deleted the yiming/default-sink-decouple branch October 10, 2023 15:52
wenym1 added a commit that referenced this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants