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

diagnose: enhance the execdetails when the pessimistic retry happens #37282

Open
cfzjywxk opened this issue Aug 22, 2022 · 0 comments
Open

diagnose: enhance the execdetails when the pessimistic retry happens #37282

cfzjywxk opened this issue Aug 22, 2022 · 0 comments
Assignees
Labels
sig/transaction SIG:Transaction type/enhancement The issue or PR belongs to an enhancement.

Comments

@cfzjywxk
Copy link
Contributor

Enhancement

Ref: #34106

When pessimistic retry happens, the whole statement would be retired several times because of the write conflict error. By now the slow log would display information like this:

id     task	estRows	operator info                                             	actRows	execution info                                                                                                    	memory 	disk
Update_6        	root	0      	N/A                                                       	0      	time:3.47s, loops:6, , lock_keys: {time:684µs, region:2, keys:2, lock_rpc:641.969µs, rpc_count:2, retry_count:1}	0 Bytes	N/A
└─Selection_11  	root	1.01   	eq(t.c, "1")                        	1      	time:3.47s, loops:7                                                                                               	11.4 KB	N/A
└─Point_Get_10	root	1      	table:t, clustered index:PRIMARY(pk), lock	1      	time:3.47s, loops:8, Get:{num_rpc:6, total_time:1.74ms}                                                           	N/A    	N/A

It's still quite unclear how the 3.47s duration is composed of. Actually, the kv RPC seems to be quite fast. For the point get executor, the lock happens when it's executed but nothing related is recorded in the point get execution details. There're several things that could be done to improve this and make the diagnosis information clear.

  • Record the information properly if the statement retry happens especially the pessimistic conflict retry path.
  • Record the lock execution details in the point get and batch point get executors correctly.
@cfzjywxk cfzjywxk added type/enhancement The issue or PR belongs to an enhancement. sig/transaction SIG:Transaction labels Aug 22, 2022
@cfzjywxk cfzjywxk changed the title diagnose: enhance the execdetails when the pessimistic happens diagnose: enhance the execdetails when the pessimistic retry happens Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/transaction SIG:Transaction type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants