Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txn-file: Fix missing txn chunks in prewrite #1350

Merged
merged 2 commits into from
May 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
polish
Signed-off-by: Ping Yu <yuping@pingcap.com>
  • Loading branch information
pingyu committed May 22, 2024
commit 8ab3da907b48fbad95d5d1e04c13af33025fa4d4
2 changes: 1 addition & 1 deletion txnkv/transaction/txn_file.go
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ func (cs *txnChunkSlice) groupToBatches(c *locate.RegionCache, bo *retry.Backoff
sort.Slice(batches, func(i, j int) bool {
// Sort by both chunks and region, to make sure that primary key is in the first batch:
// 1. Different batches may contain the same chunks.
// 2. Different batches may have regions with same start key (if region merge happens during grouping)
// 2. Different batches may have regions with same start key (if region merge happens during grouping).
cmp := bytes.Compare(batches[i].region.StartKey, batches[j].region.StartKey)
if cmp == 0 {
return bytes.Compare(batches[i].Smallest(), batches[j].Smallest()) < 0