Merge pull request #273 from ekexium/1pc-panic

Fix 1PC panic
This commit is contained in:
Nick Cameron 2021-04-28 19:56:34 +12:00 committed by GitHub
commit 3f91f3292b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ impl Shardable for kvrpcpb::PrewriteRequest {
}
// Only if there is only one request to send
if self.try_one_pc && self.mutations.len() != self.secondaries.len() + 1 {
if self.try_one_pc && shard.len() != self.secondaries.len() + 1 {
self.set_try_one_pc(false);
}