Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Jul 21, 2021
1 parent bf46657 commit 680d7ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/server/pegasus_server_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ int pegasus_server_write::on_batched_writes(dsn::message_ex **requests, int coun
}
}

if (err == 0) {
err = _write_svc->batch_commit(_decree);
} else {
_write_svc->batch_abort(_decree, err);
if (dsn_likely(_put_rpc_batch.size() + _remove_rpc_batch.size() != 0)) {
if (err == 0) {
err = _write_svc->batch_commit(_decree);
} else {
_write_svc->batch_abort(_decree, err);
}
}
}

Expand Down

0 comments on commit 680d7ea

Please sign in to comment.