[close #540] rawkv: fix scan return empty set while exist empty key#541
[close #540] rawkv: fix scan return empty set while exist empty key#541marsishandsome merged 6 commits intotikv:masterfrom
Conversation
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
src/main/java/org/tikv/common/operation/iterator/RawScanIterator.java
Outdated
Show resolved
Hide resolved
|
test failed, please take a look: |
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Fixed, PTAL |
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #541 +/- ##
============================================
+ Coverage 31.72% 31.87% +0.14%
- Complexity 1303 1320 +17
============================================
Files 278 278
Lines 17344 17345 +1
Branches 1975 1975
============================================
+ Hits 5503 5528 +25
+ Misses 11223 11215 -8
+ Partials 618 602 -16
Continue to review full report at Codecov.
|
| if (!processingLastBatch) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
if limit > 0 && processingLastBatch = false:
- your code returns
false - origional code returns
true
There was a problem hiding this comment.
In hasNext, it call !endOfScan() instead of notEndOfScan which is more confusing.
There was a problem hiding this comment.
ok, I understand.
I recommend to separate bug fix and code refactor in 2 PRs.
| return client.scan(RAW_START_KEY, RAW_END_KEY); | ||
| } | ||
|
|
||
| // https://github.com/tikv/client-java/issues/540 |
There was a problem hiding this comment.
we can find the issue link according to the commit id.
src/main/java/org/tikv/common/operation/iterator/RawScanIterator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
|
/merge |
|
/run-all-tests |
|
@iosmanthus test failed: |
It should be an upstream issue. |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-3.1 in PR #545 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-3.2 in PR #546 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: iosmanthus <dengliming@pingcap.com>
This reverts commit ad6a00f.
This reverts commit ad6a00f.
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: iosmanthus <dengliming@pingcap.com>
Signed-off-by: iosmanthus myosmanthustree@gmail.com
What problem does this PR solve?
Issue Number: close #540
Problem Description:
This pull request adds an empty key check for
RawScanIterator.hasNext, otherwise, if there is an empty key in TiKV, the scan will always return an empty set.Check List for Tests
This PR has been tested by at least one of the following methods: