-
Notifications
You must be signed in to change notification settings - Fork 590
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
refactor(source): respect max chunk size in source connector parser #19698
Open
stdrc
wants to merge
11
commits into
main
Choose a base branch
from
rc/respect-chunk-size-limit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
9 tasks
stdrc
changed the title
change
refactor(source): change Dec 6, 2024
SourceCtrlOpts::rate_limit
to split_txn: bool
SourceCtrlOpts::rate_limit
to split_txn: bool
stdrc
changed the title
refactor(source): change
refactor(source):
Dec 6, 2024
SourceCtrlOpts::rate_limit
to split_txn: bool
stdrc
changed the title
refactor(source): respect max chunk size in
refactor(source): respect max chunk size in source connector parser
Dec 6, 2024
stdrc
force-pushed
the
rc/merge-hb-and-data-chunk-for-cdc
branch
from
December 6, 2024 08:28
a8d2c05
to
185defc
Compare
stdrc
force-pushed
the
rc/respect-chunk-size-limit
branch
from
December 6, 2024 08:29
d3af95f
to
46e5995
Compare
stdrc
force-pushed
the
rc/respect-chunk-size-limit
branch
2 times, most recently
from
December 11, 2024 08:56
5f97579
to
c7cdfb5
Compare
any context about the refactor? |
still WIP, will add description when it's ready |
stdrc
force-pushed
the
rc/respect-chunk-size-limit
branch
from
December 17, 2024 06:43
c77b7d0
to
3f2f0a0
Compare
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
…iter Signed-off-by: Richard Chien <[email protected]>
… type Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
stdrc
force-pushed
the
rc/respect-chunk-size-limit
branch
from
December 17, 2024 06:58
3f2f0a0
to
1d9e42e
Compare
stdrc
requested review from
StrikeW,
tabVersion,
xxchan,
kwannoel,
fuyufjh and
xiangjinwu
December 17, 2024 07:09
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
In
SourceStreamChunkBuilder
, with the information ofSourceCtrlOps
, we can actually restrict the chunk size early during chunk building, instead emitting large chunks first and cutting them into small ones later inapply_rate_limit
. This has two benefits:apply_rate_limit
used byFetchExecutor
,FsSourceExecutor
,SourceBackfillExecutor
andSourceExecutor
.Main changes happened in this PR:
Change
SourceCtrlOpts::rate_limit: Option<u32>
tosplit_txn: bool
.This is because we already pass in a limited chunk size (basically
min(stream_chunk_size, rate_limit_burst)
) viaSourceCtrlOpts::chunk_size
. We still needsplit_txn
to control whether we need to cut chunks during (CDC) transactions, as concluded here.Simplify
SourceStreamChunkRowWriter
, by directly store a reference toSourceStreamChunkBuilder
inside it.Rewrite
SourceStreamChunkBuilder
to allow creating chunk during writing toSourceStreamChunkRowWriter
. The trick is to add aready_chunks
field.This is because that it's possible to parse multiple rows from one
SourceMessage
, while the parser API doesn't use async stream to yield rows, instead, it directly write toSourceStreamChunkRowWriter
.Checklist
./risedev check
(or alias,./risedev c
)Documentation
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.