Skip to content

fix: temporarily remove the assert checking for split migration #12117

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 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions src/stream/src/executor/source/source_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,40 +121,6 @@ impl<S: StateStore> SourceExecutor<S> {
.map_err(StreamExecutorError::connector_error)
}

fn check_split_assignment_is_migration(
&self,
actor_splits: &HashMap<ActorId, Vec<SplitImpl>>,
) -> bool {
let core = self.stream_source_core.as_ref().unwrap();

let mut split_to_actors_index = HashMap::new();

for (actor_id, splits) in actor_splits {
for split in splits {
split_to_actors_index
.entry(split.id())
.or_insert(vec![])
.push(*actor_id);
}
}

for split_id in core.state_cache.keys() {
if let Some(actor_ids) = split_to_actors_index.remove(split_id) {
if !actor_ids.contains(&self.actor_ctx.id) {
tracing::warn!(
"split {} migration from {} detected, target might be {:?}",
split_id,
self.actor_ctx.id,
actor_ids
);
return true;
}
}
}

false
}

#[inline]
fn get_metric_labels(&self) -> [String; 3] {
[
Expand Down Expand Up @@ -520,15 +486,6 @@ impl<S: StateStore> SourceExecutor<S> {
"source change split received"
);

// In the context of split changes, we do not allow
// split
// migration because it can lead to inconsistent states.
// Therefore, all split migration must be done via
// update
// mutation and pause/resume
assert!(!self
.check_split_assignment_is_migration(actor_splits));

target_state = self
.apply_split_change(
&source_desc,
Expand Down