-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] Checking parent controller region state before handling …
…requests for all routes (#1075) * Resolving merge conflicts * Implemented active parent controller check for all routes with VeniceParentControllerRegionStateHandler * Fixed CreateVersionTest * Added ParentControllerRegionState properties to tests * Revert "Implemented active parent controller check for all routes with VeniceParentControllerRegionStateHandler" This reverts commit 1c03f5b. * Implemented active checks, reverted test case, minor javadoc nit - Added ACTIVE checks to all routes in AdminSparkServer using VeniceParentControllerRegionStateHandler wrapper class - Reverted CreateVersionTest to previous commit without ParentControllerRegionState.ACTIVE - Removed some minor parentheses in ParentControllerRegionState * Reverted TestAdminSparkServer and TestBackupControllerResponse without ParentControllerRegionState.ACTIVE
- Loading branch information
Showing
11 changed files
with
519 additions
and
114 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
16 changes: 16 additions & 0 deletions
16
...-controller/src/main/java/com/linkedin/venice/controller/ParentControllerRegionState.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.linkedin.venice.controller; | ||
|
||
/** | ||
* Enum representing the state of the region where the parent controller resides. | ||
* i.e., Region dc-0 is ACTIVE while Region dc-1 is PASSIVE | ||
* This means that ParentController in dc-0 is serving requests while ParentController in dc-1 is rejecting requests | ||
*/ | ||
public enum ParentControllerRegionState { | ||
/** The region is active, so the parent controller in the region is serving requests */ | ||
ACTIVE, | ||
/** | ||
* The region is passive, so the parent controller in the region is rejecting requests. | ||
* This region is ready to take over if components in the currently active region fails | ||
*/ | ||
PASSIVE | ||
} |
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.