Skip to content

Commit

Permalink
cherry pick pingcap#19198 to release-4.0
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
lzmhhh123 authored and ti-srebot committed Aug 21, 2020
1 parent fb95293 commit 358a9c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/tikv/region_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ func (c *RegionCache) insertRegionToCache(cachedRegion *Region) {
if old != nil {
// Don't refresh TiFlash work idx for region. Otherwise, it will always goto a invalid store which
// is under transferring regions.
cachedRegion.getStore().workTiFlashIdx = old.(*btreeItem).cachedRegion.getStore().workTiFlashIdx
atomic.StoreInt32(&cachedRegion.getStore().workTiFlashIdx, atomic.LoadInt32(&old.(*btreeItem).cachedRegion.getStore().workTiFlashIdx))
delete(c.mu.regions, old.(*btreeItem).cachedRegion.VerID())
}
c.mu.regions[cachedRegion.VerID()] = cachedRegion
Expand Down

0 comments on commit 358a9c6

Please sign in to comment.