-
Notifications
You must be signed in to change notification settings - Fork 222
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: seperate prewrite and commit in detail information and add clone methods #567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// The prewrite requests are executed concurrently so the slowest request information would be recorded. | ||
SlowestPrewrite ReqDetailInfo | ||
// It's recorded only when the commit mode is 2pc. | ||
CommitPrimary ReqDetailInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we also observe the number of prewrite/commit requests as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new field PrewriteReqNum
is added.
Where are the deep clones used? I'm afraid deep cloning such deep nested structures could be very expensive and if we really need to use it, it's probably unacceptable in performance |
@sticnarf |
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
be579ab
to
a4a5234
Compare
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The tidb in integration tests have to be upgraded to make CI pass.
Signed-off-by: cfzjywxk <lsswxrxr@163.com>
@sticnarf |
The compatibility test is not required. Let me retry the failed integration test. |
It seems the integration test needs to build tidb like the compatibility test. Error: ../../../../go/pkg/mod/github.com/defined2014/tidb@v1.1.0-beta.0.20220725074011-ee134690c221/util/execdetails/execdetails.go:162:27: commitDetails.Mu.BackoffTypes undefined (type struct{sync.Mutex; CommitBackoffTime int64; PrewriteBackoffTypes []string; CommitBackoffTypes []string; SlowestPrewrite util.ReqDetailInfo; CommitPrimary util.ReqDetailInfo} has no field or method BackoffTypes) |
… methods (tikv#567) * seperate the prewrite and commit primary in runtime info Signed-off-by: cfzjywxk <lsswxrxr@163.com> * fix the integration test Signed-off-by: cfzjywxk <lsswxrxr@163.com> Signed-off-by: cfzjywxk <lsswxrxr@163.com>
Ref: tikv/tikv#12362
As the
CommitDetails
is changed and it's directly used in the tidb code, this is a breaking change.execDetail
. So it's more clear for the 2pc mode committed transactions.Clone
methods for several structs.Signed-off-by: cfzjywxk lsswxrxr@163.com