-
Notifications
You must be signed in to change notification settings - Fork 287
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
kv client: ignore prewrite event if value is empty #446
Conversation
/run-integration-tests |
/run-integration-tests |
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
value := row.GetValue() | ||
// tikv may send a prewrite event with empty value | ||
// here we need to avoid the invalid prewrite event overwrite the value | ||
if _, exist := m.unmatchedValue[key]; exist && len(value) == 0 { |
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.
PTAL @5kbpers
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, I think it just is a workaround, better to mark the type of prewrite and commit in the future, then we could handle the situations like this more flexibly.
What problem does this PR solve?
ignore prewrite event if value is empty
What is changed and how it works?
Check List
Tests