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): set default_sink_decouple = true for all sink #18182

Merged
merged 6 commits into from
Aug 26, 2024

Conversation

xxhZs
Copy link
Contributor

@xxhZs xxhZs commented Aug 22, 2024

su

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

What's changed and what's your intention?

#17095

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

after this pr,
all sink sink_decouple default is true
And starrocks clickhouse iceberg deltalake 's default commit_checkpoint_interval is 1

su

fmt
@xxhZs xxhZs requested review from fuyufjh, wenym1 and hzxa21 and removed request for fuyufjh and wenym1 August 23, 2024 05:39
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.

LGTM.

For sinks that can configure commit_checkpoint_interval, will increasing commit_checkpoint_interval from 1 to 10 cause more memory pressure on the compute node? In other words, is the buffering before commit happen in RW CN's memory or in external sink?

@wenym1 PTAL as well.

Copy link
Contributor

@wenym1 wenym1 left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@@ -17,6 +17,7 @@ CREATE SINK s6 AS select mv6.v1 as v1, mv6.v2 as v2, mv6.v3 as v3, mv6.v4 as v4,
clickhouse.password = '',
clickhouse.database = 'default',
clickhouse.table='demo_test',
commit_checkpoint_interval = 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is setting this field just to implicitly enable sink decouple, or it becomes required to set this field after this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because sink_decouple = false will report an error when commit_checkpoint_interval >10;
And in ci , we need sink_decouple = false to ensure that flush can flush data to sink.
So we set commit_checkpoint_interval = 1,
After this PR, if it is not set, a default value of 10 will be given

Copy link
Member

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM and Thanks!

By the way, there are several open PRs listed in #17095 (comment), cc. reviewer @wenym1

/// Commit every n(>0) checkpoints, default is 10.
#[serde(default = "default_commit_checkpoint_interval")]
#[serde_as(as = "DisplayFromStr")]
pub commit_checkpoint_interval: u64,
Copy link
Member

Choose a reason for hiding this comment

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

Regarding of the change to default value, don't forget to update the doc as well. :)

@xxhZs xxhZs added the user-facing-changes Contains changes that are visible to users label Aug 23, 2024
@xxhZs xxhZs added this pull request to the merge queue Aug 26, 2024
@graphite-app graphite-app bot requested a review from a team August 26, 2024 04:10
Merged via the queue into main with commit 7d20fa8 Aug 26, 2024
37 of 39 checks passed
@xxhZs xxhZs deleted the xxh/sink-decouple- branch August 26, 2024 04:37
github-merge-queue bot pushed a commit that referenced this pull request Aug 26, 2024
…18233)

Co-authored-by: Xinhao Xu <84456268+xxhZs@users.noreply.github.com>
@chenzl25
Copy link
Contributor

Why not change the sink test as well? This PR changes the default behavior of all sinks to decouple. We should make the test compatible with this change. BTW, what if we set sink_decouple = false? It would cause an error

config `commit_checkpoint_interval` larger than 1, which means that sink decouple must be enabled, but session config sink_decouple is disabled.

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.

5 participants