Thanks to visit codestin.com
Credit goes to github.com

Skip to content

decode EpochNotMatch should ignore invalid region #763

Description

@iosmanthus

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions