Bug Report
1. Describe the bug
While decoding the EpochNotMatch region error response from TiKV, we should ignore the invalid region, instead of abandoning the whole decoding process
|
for (Metapb.Region meta : currentRegions) { |
|
// The region needs to be decoded to plain format. |
|
meta = regionManager.getPDClient().getCodec().decodeRegion(meta); |
|
TiRegion region = regionManager.createRegion(meta, backOffer); |
|
newRegions.add(region); |
|
if (recv.getRegion().getVerID() == region.getVerID()) { |
|
needInvalidateOld = false; |
|
} |
|
} |
If line 232 throws an exception, the parent region will fail to update.
2. Minimal reproduction step (Required)
Launch a rawkv cluster, run some workload then split the r000, "" with key 'x'
3. What did you see instead (Required)
4. What did you expect to see? (Required)
5. What are your Java Client and TiKV versions? (Required)
Bug Report
1. Describe the bug
While decoding the EpochNotMatch region error response from TiKV, we should ignore the invalid region, instead of abandoning the whole decoding process
client-java/src/main/java/org/tikv/common/operation/RegionErrorHandler.java
Lines 230 to 238 in cb26d58
If line 232 throws an exception, the parent region will fail to update.
2. Minimal reproduction step (Required)
Launch a rawkv cluster, run some workload then split the
r000, ""with key 'x'3. What did you see instead (Required)
4. What did you expect to see? (Required)
5. What are your Java Client and TiKV versions? (Required)