-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[controller] Checking parent controller region state before handling requests for all routes #1075
Conversation
internal/venice-common/src/main/java/com/linkedin/venice/ParentControllerState.java
Outdated
Show resolved
Hide resolved
services/venice-controller/src/main/java/com/linkedin/venice/controller/Admin.java
Outdated
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/ParentControllerState.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/linkedin/venice/controller/server/VeniceParentControllerStateHandler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/linkedin/venice/controller/server/VeniceParentControllerStateHandler.java
Outdated
Show resolved
Hide resolved
internal/venice-common/src/main/java/com/linkedin/venice/ConfigKeys.java
Outdated
Show resolved
Hide resolved
...e-controller/src/main/java/com/linkedin/venice/controller/VeniceControllerClusterConfig.java
Outdated
Show resolved
Hide resolved
bac4d5e
to
5c3f6a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Tony!
Left one query. If you think it doesn't apply, feel free to resolve it and merge the PR
...integrationTest/java/com/linkedin/venice/controller/server/TestBackupControllerResponse.java
Outdated
Show resolved
Hide resolved
…ParentControllerRegionStateHandler
…h VeniceParentControllerRegionStateHandler" This reverts commit 1c03f5b.
- 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
8e492e1
to
df3f9b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking quite good. Just the two test-related changes needed
...mon/src/integrationTest/java/com/linkedin/venice/controller/server/TestAdminSparkServer.java
Outdated
Show resolved
Hide resolved
…t ParentControllerRegionState.ACTIVE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @bonytoni !
Checking parent controller region state before handling requests for all routes
ParentControllerRegionState
ACTIVE
- parent controller serves requestsPASSIVE
- parent controller rejects requestsVeniceParentControllerRegionStateHandler
is a wrapper class forRoute
that checks the state of the region of the parent controller before handling requests. This class was used inAdminSparkServer
to wrap routes in:AdminCommandExecutionRoutes
AdminTopicMetadataRoutes
ClusterDiscovery
ClusterRoutes
ControllerRoutes
CreateStore
CreateVersion
DataRecoveryRoutes
JobRoutes
MigrationRoutes
NewClusterBuildOutRoutes
NodesAndReplicas
RoutersClusterConfigRoutes
SchemaRoutes
SkipAdminRoute
StoragePersonaRoutes
StoresRoutes
VersionRoute
CONTROLLER_PARENT_REGION_STATE
inConfigKeys
to retrieve the config value from the backendNext steps: Implement the parent controller region state config in the backend
How was this PR tested?
Unit Tests, Integration Tests
Does this PR introduce any user-facing changes?