Skip to content
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

FLASH-674: check region version in executeTS #322

Merged
merged 13 commits into from
Nov 18, 2019

Conversation

windtalker
Copy link
Contributor

No description provided.

Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zanmato1984 zanmato1984 changed the title check region version in executeTS FLASH-674: check region version in executeTS Nov 14, 2019
@windtalker
Copy link
Contributor Author

/run-integration-tests

@windtalker windtalker merged commit 0acced4 into pingcap:master Nov 18, 2019
@@ -262,11 +262,12 @@ void InterpreterDAG::executeTS(const tipb::TableScan & ts, Pipeline & pipeline)
info.version = dag.getRegionVersion();
info.conf_version = dag.getRegionConfVersion();
auto current_region = context.getTMTContext().getKVStore()->getRegion(info.region_id);
if (!current_region)
if (!current_region || current_region->version() != dag.getRegionVersion() || current_region->confVer() != dag.getRegionConfVersion())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add one more check:

if (current_region->isPendingRemove())
     // throw RegionException(..., RegionException::RegionReadStatus::PENDING_REMOVE);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, region status should also be checked here

JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this pull request Dec 3, 2024
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
CalvinNeo added a commit to CalvinNeo/tiflash that referenced this pull request Dec 30, 2024
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants