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

When the thread has been interrupted, there is no need for waitBackOffTime #3961

Conversation

wenbingshen
Copy link
Member

Motivation

When the thread has been interrupted, there is no need for waitBackOffTime, we can directly shutdown ReplicationWorker.

if (Thread.currentThread().isInterrupted()) {
LOG.error("Interrupted while replicating fragments");
shutdown();
return;
}
waitBackOffTime(rwRereplicateBackoffMs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already handled the InterruptedException at line 251. It looks like there want to check if the thread is interrupted after waiting the time. In the waitBackOffTime, it may interrupt the current thread.

@hangc0276
Copy link
Contributor

hangc0276 commented Jan 8, 2024

@wenbingshen Close this PR. If you have more updates, please reopen it.

@hangc0276 hangc0276 closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants