Skip to content

Commit 1a0daf3

Browse files
YuJuncenpingyu
andauthored
txn: Set "CommitRequest.UseAsyncCommit" for async commit (#1730)
Signed-off-by: Ping Yu <[email protected]> Signed-off-by: Juncen Yu <[email protected]> Co-authored-by: Ping Yu <[email protected]>
1 parent 017cde6 commit 1a0daf3

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/pingcap/errors v0.11.5-0.20241219054535-6b8c588c3122
1717
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
1818
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989
19-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3
19+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4
2020
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3
2121
github.com/pkg/errors v0.9.1
2222
github.com/prometheus/client_golang v1.20.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXH
7979
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4=
8080
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E=
8181
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
82-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3 h1:OcZxUJEwZzFIqY8AkRIHuEK8U1X5OyLfqAwVnhaKsag=
83-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
82+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4 h1:Heh92YLNrK2KTXiLj+cXbCTKG1TmZVSNagyvsGtoqHk=
83+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
8484
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 h1:HR/ylkkLmGdSSDaD8IDP+SZrdhV1Kibl9KrHxJ9eciw=
8585
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
8686
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

integration_tests/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ module integration_tests
33
go 1.24.1
44

55
require (
6+
github.com/google/uuid v1.6.0
67
github.com/ninedraft/israce v0.0.3
78
github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee
89
github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86
9-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3
10+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4
1011
github.com/pingcap/tidb v1.1.0-beta.0.20250609033843-a165d9fd7c01
1112
github.com/pkg/errors v0.9.1
1213
github.com/stretchr/testify v1.10.0
1314
github.com/tidwall/gjson v1.14.4
1415
github.com/tikv/client-go/v2 v2.0.8-0.20250528090949-e84f1a780fa6
1516
github.com/tikv/pd/client v0.0.0-20250625073039-fb496b371ff3
1617
go.uber.org/goleak v1.3.0
18+
google.golang.org/grpc v1.63.2
1719
)
1820

1921
require (
@@ -44,7 +46,6 @@ require (
4446
github.com/golang/protobuf v1.5.4 // indirect
4547
github.com/golang/snappy v0.0.4 // indirect
4648
github.com/google/btree v1.1.2 // indirect
47-
github.com/google/uuid v1.6.0 // indirect
4849
github.com/gorilla/mux v1.8.1 // indirect
4950
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
5051
github.com/influxdata/tdigest v0.0.1 // indirect
@@ -104,7 +105,6 @@ require (
104105
golang.org/x/tools v0.33.0 // indirect
105106
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
106107
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
107-
google.golang.org/grpc v1.63.2 // indirect
108108
google.golang.org/protobuf v1.36.6 // indirect
109109
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
110110
gopkg.in/yaml.v2 v2.4.0 // indirect

integration_tests/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,8 +1351,8 @@ github.com/pingcap/fn v1.0.0/go.mod h1:u9WZ1ZiOD1RpNhcI42RucFh/lBuzTu6rw88a+oF2Z
13511351
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E=
13521352
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
13531353
github.com/pingcap/kvproto v0.0.0-20241113043844-e1fa7ea8c302/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
1354-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3 h1:OcZxUJEwZzFIqY8AkRIHuEK8U1X5OyLfqAwVnhaKsag=
1355-
github.com/pingcap/kvproto v0.0.0-20250616075548-d951fb623bb3/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
1354+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4 h1:Heh92YLNrK2KTXiLj+cXbCTKG1TmZVSNagyvsGtoqHk=
1355+
github.com/pingcap/kvproto v0.0.0-20250728031536-f08901d17bf4/go.mod h1:rXxWk2UnwfUhLXha1jxRWPADw9eMZGWEWCg92Tgmb/8=
13561356
github.com/pingcap/log v0.0.0-20210625125904-98ed8e2eb1c7/go.mod h1:8AanEdAHATuRurdGxZXBz0At+9avep+ub7U1AGYLIMM=
13571357
github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
13581358
github.com/pingcap/log v1.1.1-0.20250514022801-14f3b4ca066e h1:8AZZRv1Ox9FVGATVZBBgr6y1MrNBQFABEdovNJt1QIc=

txnkv/transaction/commit.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ func (action actionCommit) handleSingleBatch(c *twoPhaseCommitter, bo *retry.Bac
8080
commitRole = kvrpcpb.CommitRole_Secondary
8181
}
8282
req := tikvrpc.NewRequest(tikvrpc.CmdCommit, &kvrpcpb.CommitRequest{
83-
StartVersion: c.startTS,
84-
Keys: keys,
85-
PrimaryKey: c.primary(),
86-
CommitVersion: c.commitTS,
87-
CommitRole: commitRole,
83+
StartVersion: c.startTS,
84+
Keys: keys,
85+
PrimaryKey: c.primary(),
86+
CommitVersion: c.commitTS,
87+
CommitRole: commitRole,
88+
UseAsyncCommit: c.isAsyncCommit(),
8889
}, kvrpcpb.Context{
8990
Priority: c.priority,
9091
SyncLog: c.syncLog,

0 commit comments

Comments
 (0)