mirror of https://github.com/tikv/client-rust.git
Merge b481480cf1 into 691df4d95a
This commit is contained in:
commit
1e1000fb91
|
|
@ -1265,6 +1265,11 @@ struct Committer<PdC: PdClient = PdRpcClient> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<PdC: PdClient> Committer<PdC> {
|
impl<PdC: PdClient> Committer<PdC> {
|
||||||
|
// CheckNotExists is checked in the prewrite phase and should not appear in the commit phase.
|
||||||
|
fn filter_out_check_not_exists_mutations(&mut self) {
|
||||||
|
self.mutations.retain(|m| m.op() != Op::CheckNotExists)
|
||||||
|
}
|
||||||
|
|
||||||
async fn commit(mut self) -> Result<Option<Timestamp>> {
|
async fn commit(mut self) -> Result<Option<Timestamp>> {
|
||||||
debug!("committing");
|
debug!("committing");
|
||||||
|
|
||||||
|
|
@ -1281,6 +1286,8 @@ impl<PdC: PdClient> Committer<PdC> {
|
||||||
return Ok(min_commit_ts);
|
return Ok(min_commit_ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.filter_out_check_not_exists_mutations();
|
||||||
|
|
||||||
let commit_ts = if self.options.async_commit {
|
let commit_ts = if self.options.async_commit {
|
||||||
// FIXME: min_commit_ts == 0 => fallback to normal 2PC
|
// FIXME: min_commit_ts == 0 => fallback to normal 2PC
|
||||||
min_commit_ts.unwrap()
|
min_commit_ts.unwrap()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue