Skip to content
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

FAILED_STOP re-executes the task #4

Closed
JimBugwadia opened this issue Jan 30, 2015 · 2 comments
Closed

FAILED_STOP re-executes the task #4

JimBugwadia opened this issue Jan 30, 2015 · 2 comments

Comments

@JimBugwadia
Copy link
Collaborator

The TaskExecutor is re-queing after each failure even if we return as

new TaskExecutionResult(TaskExecutionStatus.FAILED_STOP, "Failed to execute config stats task");

It is always requeing the task the code in org.apache.curator.framework.recipes.queue.DistributedQueue class

try
{
consumer.consumeMessage(item);
}
catch ( Throwable e )errorMode.get()
{
log.error("Exception processing queue item: " + itemNode, e);
if ( errorMode.get() == ErrorMode.REQUEUE )
{
resultCode = ProcessMessageBytesCode.REQUEUE; break; }
}
}

@Randgalt
Copy link
Contributor

I'm unable to reproduce this. I didn't have a test for FAILED_STOP but I just added one and it works correctly (831be15).

The code you show above is how exceptions are handled. The message is re-queued on exception, but FAILED_STOP is not an exception.

Can you write a test that shows the problem?

@Randgalt Randgalt self-assigned this Jan 30, 2015
@JimBugwadia
Copy link
Collaborator Author

You are right - the previously reported behavior was when an exception was thrown and not when FAILED_STOP is returned (works correctly then.)

Closing this. I will add a separate feature request to throttle exceptions as that exhausted resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants