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

metric: the lock resolver counter for expired type is incorrect #22356

Open
cfzjywxk opened this issue Jan 12, 2021 · 3 comments
Open

metric: the lock resolver counter for expired type is incorrect #22356

cfzjywxk opened this issue Jan 12, 2021 · 3 comments
Labels
severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@cfzjywxk
Copy link
Contributor

cfzjywxk commented Jan 12, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Run some test having conflict read/write like ycsb tests.

2. What did you expect to see? (Required)

There should be few expired counter value.

3. What did you see instead (Required)

Many expired counter value.

4. What is your TiDB version? (Required)

The release-5.0-rc branch.

8df9dbb

The tikvLockResolverCountWithExpired collects value everytime for the transaction status with ttl == 0, but it does not mean the transaction is expired if the commitTS is greater than zero. The counter should increase only if the transaction is really expired.

@cfzjywxk cfzjywxk added type/bug The issue is confirmed as a bug. sig/transaction SIG:Transaction severity/moderate labels Jan 12, 2021
@dwangxxx
Copy link
Contributor

dwangxxx commented Jan 1, 2022

It means that we just need to update LockResolverCountWithExpired when the transaction is really expired (ttl==0 and commmitTS == 0)? If commitTS > 0, it means the transaction is committed, we should not update LockResolverCountWithExpired. Do I understand this correctly?

@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Jan 3, 2022

It means that we just need to update LockResolverCountWithExpired when the transaction is really expired (ttl==0 and commmitTS == 0)? If commitTS > 0, it means the transaction is committed, we should not update LockResolverCountWithExpired. Do I understand this correctly?

@dwangxxx
Yes currently the meaning of expire is confusing, we need to make it clear and document about it. Also we may need to check these metrics related to transactional status if they are correct.

@dwangxxx
Copy link
Contributor

dwangxxx commented Jan 3, 2022

It means that we just need to update LockResolverCountWithExpired when the transaction is really expired (ttl==0 and commmitTS == 0)? If commitTS > 0, it means the transaction is committed, we should not update LockResolverCountWithExpired. Do I understand this correctly?

@dwangxxx Yes currently the meaning of expire is confusing, we need to make it clear and document about it. Also we may need to check these metrics related to transactional status if they are correct.

Ok, LockResolverCountWithExpired is implemented in client-go in master branch. Should I implement it in client-go or release-5.0-rc branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants