alirezazamani commented on a change in pull request #1142:
URL: https://github.com/apache/helix/pull/1142#discussion_r455406410
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/task/TestDeleteJobFromJobQueue.java
##########
@@ -44,10 +44,10 @@ public void testForceDeleteJobFromJobQueue() throws
InterruptedException {
// Create two jobs: job1 will complete fast, and job2 will be stuck in
progress (taking a long
// time to finish). The idea is to force-delete a stuck job (job2).
JobConfig.Builder jobBuilder =
JobConfig.Builder.fromMap(WorkflowGenerator.DEFAULT_JOB_CONFIG)
- .setMaxAttemptsPerTask(1).setWorkflow(jobQueueName)
+ .setWorkflow(jobQueueName)
Review comment:
I reverted this change for this test. However, we still need to increase
number of attempts for some test that we stop the participant and start them
again.
For example, in the
TestForceDeleteWorkflow.testDeleteCompletedWorkflowForcefully:
In super.beforeClass() we start the participant, however, once the test
started, we stop those participants and start them again. I have observed that
if we start the workflow very close to the time that we start the participant
one by one (kind of like rolling upgrade), Master might jump several times
between the nodes. Hence if we set maxNumberOfAttempts to 1, then the test will
fail. Since we just started to respect maxNumberOfAttempts in this PR.
About your second comment: Yeah the newly added test checks
maxNumberOfAttempts for targetJobChange. For "rebalanceRunningTask", I checked
other tests and I saw we this logic is already covered in
"TestRebalanceRunningTask" extensively for different scenarios. So if rebalance
running task is set and we need to drop the task in one instance and run in
other one (Send INIT->RUNNING), then this is new scheduling and we are
respecting max number of attempts. So rebalanceRunningTask is happening until
we reach maxNumberOfAttempts. In other word, once a task reaches
maxNumberOfAttempts, it won't be scheduled again. So no new INIT->RUNNING once
we reach maxNumberOfAttempts.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]