Skip to content

Commit

Permalink
fix comm
Browse files Browse the repository at this point in the history
  • Loading branch information
xxhZs committed Dec 20, 2024
1 parent 71cdba1 commit 179b396
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/connector/src/sink/mongodb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ mod send_bulk_write_command_future {
)))
})?;

if let Ok(ok) = result.get_i32("ok")
&& ok != 1
{
return Err(SinkError::Mongodb(anyhow!("bulk write write errors")));
}

if let Ok(write_errors) = result.get_array("writeErrors") {
return Err(SinkError::Mongodb(anyhow!(
"bulk write respond with write errors: {:?}",
Expand Down

0 comments on commit 179b396

Please sign in to comment.