-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Handle the failure due to reaching the servlet capacity when getting user tasks #10768
base: main
Are you sure you want to change the base?
Conversation
…user tasks Signed-off-by: Gantigmaa Selenge <[email protected]>
230e789
to
1b0ff08
Compare
/azp run build |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Gantigmaa Selenge <[email protected]>
f6e9311
to
3dd12c9
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.
Couple of small suggestions, but otherwise LGTM
*/ | ||
CruiseControlUserTasksResponse(String userTaskId, JsonObject json) { | ||
super(userTaskId, json); | ||
// The maximum number of active user tasks that can run concurrently has reached |
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.
Should this comment be on the isMaxActiveUserTasksReached
variable?
* Response to user tasks request | ||
*/ | ||
public class CruiseControlUserTasksResponse extends CruiseControlResponse { | ||
private boolean isMaxActiveUserTasksReached; |
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.
private boolean isMaxActiveUserTasksReached; | |
private boolean maxActiveUserTasksReached; |
Promise<MapAndStatus<ConfigMap, KafkaRebalanceStatus>> p, String sessionId, | ||
Set<Condition> conditions, KafkaRebalance kafkaRebalance, | ||
ConfigMapOperator configMapOperator, boolean dryRun, | ||
String host, CruiseControlApi apiClient, | ||
AbstractRebalanceOptions.AbstractRebalanceOptionsBuilder<?, ?> rebalanceOptionsBuilder) { | ||
if (cruiseControlResponse.isMaxActiveUserTasksReached()) { | ||
LOGGER.warnCr(reconciliation, "The maximum number of active user tasks that can run concurrently has reached therefore will retry getting user tasks in the next reconciliation. " + |
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.
LOGGER.warnCr(reconciliation, "The maximum number of active user tasks that can run concurrently has reached therefore will retry getting user tasks in the next reconciliation. " + | |
LOGGER.warnCr(reconciliation, "The maximum number of active user tasks that Cruise Control can run concurrently has been reached, therefore will retry getting user tasks in the next reconciliation. " + |
Promise<MapAndStatus<ConfigMap, KafkaRebalanceStatus>> p, String sessionId, | ||
Set<Condition> conditions, KafkaRebalance kafkaRebalance, | ||
ConfigMapOperator configMapOperator, boolean dryRun, | ||
String host, CruiseControlApi apiClient, | ||
AbstractRebalanceOptions.AbstractRebalanceOptionsBuilder<?, ?> rebalanceOptionsBuilder) { | ||
if (cruiseControlResponse.isMaxActiveUserTasksReached()) { | ||
LOGGER.warnCr(reconciliation, "The maximum number of active user tasks that can run concurrently has reached therefore will retry getting user tasks in the next reconciliation. " + | ||
"If this occurs often, consider increasing the value for max.active.user.tasks configuration."); |
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.
"If this occurs often, consider increasing the value for max.active.user.tasks configuration."); | |
"If this occurs often, consider increasing the value for max.active.user.tasks in the Cruise Control configuration."); |
Type of change
Select the type of your PR
Description
If failed to get user tasks due to reaching the servlet capacity, it will no longer transition the KafkaRebalance status to NotReady. Instead, KafkaRebalance status will not be changed and in the next reconciliation, it will retry getting the user tasks again. The operator will also report a warning message.
Resolves #10704
Checklist
Please go through this checklist and make sure all applicable tasks have been done