Skip to content

Commit

Permalink
writemode check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Oct 5, 2023
1 parent 23d8da9 commit 4c13df4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions nexus/flow-rs/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,17 @@ impl FlowGrpcClient {
}
}
if !cfg.initial_copy_only {
return anyhow::Result::Err(anyhow::anyhow!(
"write mode overwrite can only be set with initial_copy_only = true"
));
if let Some(QRepWriteMode {
write_type: wt,
upsert_key_columns: _,
}) = cfg.write_mode
{
if wt == QRepWriteType::QrepWriteModeOverwrite as i32 {
return anyhow::Result::Err(anyhow::anyhow!(
"write mode overwrite can only be set with initial_copy_only = true"
));
}
}
}
self.start_query_replication_flow(&cfg).await
}
Expand Down

0 comments on commit 4c13df4

Please sign in to comment.