Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
tikvclient: refine region-cache #10256
What problem does this PR solve?
try to fixes #10037, keep retry region's other stores
What is changed and how it works?
What region-cache can hold?
What fails or data outdated region-cache will meet?
normally, it happens when machine down or network partition between tidb and kv or process crash.
but sometimes, this will be caused by someone to replace a new machine or change network interface, but people don't often do that.
this means the store is working well, but info is miss matched.
normally, it's the region info be changed, seldom it's store info changed.
How current running
on send fail, it will drop region cache and remove store info, it will trigger reload region and store info.
but have 2 problems:
how this PR change
"blackout store when failure" keep the chance that failure peer can be used again but doesn't make retry flood.
cache item never be deleted and only invalidate it to trigger pd re-fetch
5 times, most recently
Apr 24, 2019
1 similar comment
1 similar comment
@@ Coverage Diff @@ ## master #10256 +/- ## ================================================ - Coverage 77.8178% 77.8144% -0.0034% ================================================ Files 410 410 Lines 84365 84438 +73 ================================================ + Hits 65651 65705 +54 - Misses 13813 13826 +13 - Partials 4901 4907 +6
@@ Coverage Diff @@ ## master #10256 +/- ## ================================================ - Coverage 77.2779% 77.2603% -0.0177% ================================================ Files 413 413 Lines 86986 87244 +258 ================================================ + Hits 67221 67405 +184 - Misses 14600 14647 +47 - Partials 5165 5192 +27