-
Notifications
You must be signed in to change notification settings - Fork 592
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(meta): commit finish catalog in barrier manager #17428
Merged
Merged
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
8ca25d5
commit finish catalog in barrier manager
kwannoel 5e911ab
add table_id_to_rx
kwannoel 6090f33
register notifier
kwannoel 6a8e51b
add wait finish stream job finished
kwannoel 716c9b0
use wait_streaming_job_finished to poll for notification version
kwannoel c2b52c9
remove call to finish stream job for recovered jobs, its always done …
kwannoel 52e2726
remove finished channel in notifier
kwannoel 3d0845a
remove notifiers from recovered stream job
kwannoel f087aa6
wait streaming job finished logic error
kwannoel ca6783e
split recovered stream job into v1 and v2
kwannoel 73721a0
update replace table info, so it can be committed in barrier manager
kwannoel 74f3a3a
handle recovered jobs
kwannoel a7eadaf
fmt
kwannoel 5224da0
add table_id_to_version map
kwannoel 060a2bb
handle tx on finish create table
kwannoel 165ac41
handle tx on finish create streaming job
kwannoel f041a68
handle tx on finish create index and sink
kwannoel 2b4bb84
handle tx on finish create table with source
kwannoel 761f2ff
handle tx for v2
kwannoel 10a9267
implement v2 wait streaming job
kwannoel 25edf4e
add wait_streaming_job to stream manager instead
kwannoel 16bb50d
handle abort_all during recovery
kwannoel 2425e7f
dont assert
kwannoel 06549e7
fix notify failed
kwannoel fca78b1
add more logs
kwannoel 89cfac9
more logs
kwannoel 69431bb
fix regression
kwannoel a7306a3
fix
kwannoel b429251
fix create sink into table
kwannoel e613f38
fmt
kwannoel 916e51d
update sink target table
kwannoel 5223e7b
fix warn
kwannoel 8f286f7
notify mv
kwannoel ea35907
fix
kwannoel 05f455b
fix
kwannoel 50026d8
fix
kwannoel a262b6b
Merge branch 'main' into kwannoel/commit-in-barrier
wenym1 ca2c5b2
check finish in catalog and refactor recovery progress param
wenym1 f5e1422
take ownership
wenym1 4e3ffdf
fix comments
wenym1 a0b234e
refactor streaming job
wenym1 844b7c3
Merge branch 'main' into kwannoel/commit-in-barrier
wenym1 9a7fee8
add doc
wenym1 3598ae9
fix doc
wenym1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,6 @@ pub(crate) struct Notifier { | |
|
||
/// Get notified when scheduled barrier is collected or failed. | ||
pub collected: Option<oneshot::Sender<MetaResult<()>>>, | ||
|
||
/// Get notified when scheduled barrier is finished. | ||
pub finished: Option<oneshot::Sender<MetaResult<()>>>, | ||
} | ||
|
||
impl Notifier { | ||
|
@@ -63,31 +60,10 @@ impl Notifier { | |
} | ||
} | ||
|
||
/// Notify when we have finished a barrier from all actors. This function consumes `self`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw, we can change to consume the ownership of notifier for method |
||
/// | ||
/// Generally when a barrier is collected, it's also finished since it does not require further | ||
/// report of finishing from actors. | ||
/// However for creating MV, this is only called when all `BackfillExecutor` report it finished. | ||
pub fn notify_finished(self) { | ||
if let Some(tx) = self.finished { | ||
tx.send(Ok(())).ok(); | ||
} | ||
} | ||
|
||
/// Notify when we failed to finish a barrier. This function consumes `self`. | ||
pub fn notify_finish_failed(self, err: MetaError) { | ||
if let Some(tx) = self.finished { | ||
tx.send(Err(err)).ok(); | ||
} | ||
} | ||
|
||
/// Notify when we failed to collect or finish a barrier. This function consumes `self`. | ||
pub fn notify_failed(self, err: MetaError) { | ||
if let Some(tx) = self.collected { | ||
tx.send(Err(err.clone())).ok(); | ||
} | ||
if let Some(tx) = self.finished { | ||
tx.send(Err(err)).ok(); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why it's named
dummy_id
? What does it mean?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And any reason to add these information in the
ReplaceTablePlan
command? I think in all commands that need to track the status of backfill, there should be aCreateStreamingJob
command, and we can get theStreamingJob
information there. What ddl would only have theReplaceTablePlan
command and we have to store theStreamingJob
here in theReplaceTablePlan
command?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the
dummy_id
the same as the id ofnew_table_fragments
?