*: fix lost index bug of insert on duplicate key update#16672
Merged
coocood merged 7 commits intopingcap:masterfrom Apr 22, 2020
Merged
*: fix lost index bug of insert on duplicate key update#16672coocood merged 7 commits intopingcap:masterfrom
coocood merged 7 commits intopingcap:masterfrom
Conversation
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
coocood
reviewed
Apr 21, 2020
table/tables/index.go
Outdated
| // So if the key exists, just do nothing and return. | ||
| _, err = txn.GetMemBuffer().Get(ctx, key) | ||
| if memTxn, ok := txn.(kv.MemBufferRetriever); ok { | ||
| _, err = memTxn.GetFromMemBuffer(ctx, key) |
Member
There was a problem hiding this comment.
I think it's better to change TxnState.GetMembuffer implementation, so we will not misuse it later.
Contributor
There was a problem hiding this comment.
The buffer level is too complex to get things right.
Contributor
Author
|
/rebuild |
tiancaiamao
reviewed
Apr 21, 2020
Signed-off-by: crazycs <crazycs520@gmail.com>
Member
|
/run-all-test |
Signed-off-by: crazycs <crazycs520@gmail.com>
Contributor
Author
|
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #16672 +/- ##
===========================================
Coverage 80.4305% 80.4305%
===========================================
Files 506 506
Lines 136958 136958
===========================================
Hits 110156 110156
Misses 18219 18219
Partials 8583 8583 |
Contributor
Author
|
/rebuild |
Member
|
LGTM |
Member
|
/run-unit-test |
Contributor
|
PTAL @tiancaiamao |
Contributor
|
LGTM |
tiancaiamao
approved these changes
Apr 22, 2020
Contributor
|
/merge |
Contributor
|
Your auto merge job has been accepted, waiting for:
|
Contributor
|
/run-all-tests |
Contributor
|
@crazycs520 merge failed. |
Member
|
Data Race case in test: |
Member
|
/run-unit-test |
2 similar comments
Member
|
/run-unit-test |
Member
|
/run-unit-test |
bb7133
added a commit
that referenced
this pull request
Apr 22, 2020
cherry-pick #16672 for this hotfix
sre-bot
pushed a commit
to sre-bot/tidb
that referenced
this pull request
Apr 22, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
Contributor
|
cherry pick to release-3.0 in PR #16687 |
sre-bot
pushed a commit
to sre-bot/tidb
that referenced
this pull request
Apr 22, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
Contributor
|
cherry pick to release-3.1 in PR #16688 |
sre-bot
pushed a commit
to sre-bot/tidb
that referenced
this pull request
Apr 22, 2020
Fix issue pingcap#16669 When check the untouched index, we should also check the memory-buffer in the session too.
Contributor
|
cherry pick to release-4.0 in PR #16689 |
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Apr 22, 2020
Fix issue pingcap#16669 When check the untouched index, we should also check the memory-buffer in the session too.
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Apr 22, 2020
Fix issue pingcap#16669 When check the untouched index, we should also check the memory-buffer in the session too.
This was referenced Apr 22, 2020
Closed
coocood
pushed a commit
that referenced
this pull request
Apr 22, 2020
bb7133
pushed a commit
that referenced
this pull request
Apr 22, 2020
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Apr 23, 2020
Fix issue pingcap#16669 When check the untouched index, we should also check the memory-buffer in the session too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: crazycs crazycs520@gmail.com
What problem does this PR solve?
Fix issue #16669
What is changed and how it works?
When check the untouched index, should also check the
memory-bufferin the session too.Related changes
Check List
Tests
Side effects
Release note