Skip to content

Commit

Permalink
*: fix lock in CheckAndPutRegion (#5768)
Browse files Browse the repository at this point in the history
ref #5615, ref #5648

Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx authored Dec 8, 2022
1 parent 1b363d8 commit 8c5c666
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/core/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ func (r *RegionsInfo) CheckAndPutRegion(region *RegionInfo) []*RegionInfo {
if err != nil {
log.Debug("region is stale", zap.Stringer("origin", origin.GetMeta()), errs.ZapError(err))
// return the state region to delete.
r.t.Unlock()
return []*RegionInfo{region}
}
origin, overlaps, rangeChanged := r.setRegionLocked(region, true, ols...)
Expand Down

0 comments on commit 8c5c666

Please sign in to comment.