Tolerate channel buffer operations being re-sent
This commit is contained in:
parent
ed2aed4f93
commit
58f58a629b
1 changed files with 10 additions and 0 deletions
|
@ -380,6 +380,16 @@ impl Database {
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
if !operations.is_empty() {
|
if !operations.is_empty() {
|
||||||
buffer_operation::Entity::insert_many(operations)
|
buffer_operation::Entity::insert_many(operations)
|
||||||
|
.on_conflict(
|
||||||
|
OnConflict::columns([
|
||||||
|
buffer_operation::Column::BufferId,
|
||||||
|
buffer_operation::Column::Epoch,
|
||||||
|
buffer_operation::Column::LamportTimestamp,
|
||||||
|
buffer_operation::Column::ReplicaId,
|
||||||
|
])
|
||||||
|
.do_nothing()
|
||||||
|
.to_owned(),
|
||||||
|
)
|
||||||
.exec(&*tx)
|
.exec(&*tx)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue