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: add newly inserted flag for memdb key node #337

Closed
wants to merge 1 commit into from

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Oct 12, 2021

Solution for pingcap/tidb#27564.

Add a new flag for key in memdb, when the key node is allocated by a PUT operation, add this flag to the key. This mark is used to identify the inserted keys generated from the transaction iteself, so that the delete operations on these unlocked keys could be skipped committing this transaction, see the comments for details in the issue.

This change could be risky, need to think it over.

@cfzjywxk
Copy link
Contributor Author

Copy link
Contributor

@MyonKeminta MyonKeminta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@you06
Copy link
Contributor

you06 commented Oct 15, 2021

Point get and batch point get use PUT operation for locking keys, not sure if there is a risk. Maybe a PUT which is enable to bypasses the newly-inserted flag is safer.

Signed-off-by: cfzjywxk <lsswxrxr@163.com>
@disksing
Copy link
Collaborator

can we merge this? cc @cfzjywxk

@cfzjywxk
Copy link
Contributor Author

can we merge this? cc @cfzjywxk

@disksing

It could not solve the issue completely, I think we could hold it by now.

@disksing
Copy link
Collaborator

Closing it to prevent distractions. Please reopen it when we want to advance.

@disksing disksing closed this Oct 25, 2021
@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Nov 8, 2021

@disksing
I've updated the local branch but could not find the reopen button, need help~

@MyonKeminta
Copy link
Contributor

@disksing I've updated the local branch but could not find the reopen button, need help~

@cfzjywxk It seems reopening is only available if the branch have not been updated since when the PR is closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants