-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed RegionInfo.SetClient. The client is now set to nil by MarkUnavailable, and then set again with MarkAvailable. This removes bugs and races where a region info may have its Client set when it shouldn't be. A region now has 3 distinct states it may be in: 1. Unavailable: AvailabilityChan() is non-nil and Client() is nil 2. Available: AvailabilityChan() is nil and Client() is non-nil 3. Stale: AvailabilityChan() is nil and Client() is nil * Documented RegionInfo type with information about those 3 states and the lifecycle. * Documented establishRegion with what it does and what it's requirements are. * Removed calls to SetClient(nil)/MarkUnavailable in clientRegionCache methods. That work is the responsibility of the caller. * getRegionAndClientForRPC no longer marks a region as unavailable if Client is nil after waiting on the AvailabilityChan. If Client is nil, that indicates the region is stale and a lookup has to be performed. Marking it as unavailable and trying to reestablish it is wasted effort. * The above change broke the use of the meta and admin regions, which are created when creating the gohbase Client/AdminClient, but don't have a Client set. These regions were relying on a missing Client to cause the region to be established. Now the meta and admin regions are established as part of NewClient and NewAdminClient, respectively.
- Loading branch information
Showing
9 changed files
with
109 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.