You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/01/21 08:08:09 UTC
[GitHub] [helix] jiajunwang opened a new issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
jiajunwang opened a new issue #1617:
URL: https://github.com/apache/helix/issues/1617
A static map of GenericHelixController is used to track all the controllers that are created in the JVM. This record is used to find the required controller object using the cluster name. However, if we run multiple controllers for a single cluster in one JVM, then these records will overwrite each other.
The problem usually happens in test when we need to simulate controller leadership election. But it may also happen in prod environment if we use a single JVM to run multiple controller instances.
One of the direct failures is that the scheduleOnDemandPipeline() method will fail since it cannot find the right controller instance from the map.
Note that this impacts WAGED rebalancer (and maybe TF logics) since they rely on the schedule method to trigger later rebalance.
The following link points to the problematic code.
https://github.com/apache/helix/blob/361e18da4152c0146daa9d9dc7929f1f2bdcd9dc/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java#L228
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] narendly commented on issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
Posted by GitBox <gi...@apache.org>.
narendly commented on issue #1617:
URL: https://github.com/apache/helix/issues/1617#issuecomment-764858787
Would adding a isLeader() check prevent this scenario here? https://github.com/apache/helix/blob/361e18da4152c0146daa9d9dc7929f1f2bdcd9dc/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java#L656
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] narendly commented on issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
Posted by GitBox <gi...@apache.org>.
narendly commented on issue #1617:
URL: https://github.com/apache/helix/issues/1617#issuecomment-764858787
Would adding a isLeader() check prevent this scenario here? https://github.com/apache/helix/blob/361e18da4152c0146daa9d9dc7929f1f2bdcd9dc/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java#L656
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] jiajunwang closed issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
Posted by GitBox <gi...@apache.org>.
jiajunwang closed issue #1617:
URL: https://github.com/apache/helix/issues/1617
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] jiajunwang edited a comment on issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
Posted by GitBox <gi...@apache.org>.
jiajunwang edited a comment on issue #1617:
URL: https://github.com/apache/helix/issues/1617#issuecomment-765793744
> Would adding a isLeader() check prevent this scenario here?
>
> https://github.com/apache/helix/blob/361e18da4152c0146daa9d9dc7929f1f2bdcd9dc/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java#L656
Possible but not necessarily the best solution. The leadership could be changed at any time. However, there is no existing way to modify the record in the map after the controller instance is created.
I believe we need to refactor this factory map to address this problem gracefully.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] jiajunwang commented on issue #1617: The static map of GenericHelixController could be overwritten if create multiple controllers for the same cluster in one JVM
Posted by GitBox <gi...@apache.org>.
jiajunwang commented on issue #1617:
URL: https://github.com/apache/helix/issues/1617#issuecomment-765793744
> Would adding a isLeader() check prevent this scenario here?
>
> https://github.com/apache/helix/blob/361e18da4152c0146daa9d9dc7929f1f2bdcd9dc/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java#L656
Possible but not necessarily the best solution. The leadership could be changed at any time. However, there is no existing way to modify the record in the map after the controller instance is created.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org