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

DBZ-594 Stop copy threads after initial sync is completed #428

Closed
wants to merge 1 commit into from

Conversation

jpechane
Copy link
Contributor

@jpechane jpechane commented Jan 31, 2018

@@ -296,6 +296,7 @@ protected boolean performInitialSync() {
Thread.interrupted();
aborted.set(true);
}
this.copyThreads.shutdown();
Copy link
Member

Choose a reason for hiding this comment

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

This won't wait for the tasks to complete (see its JavaDoc). A call to awaitTermination() is in order.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMHO it will work

  1. see the latch.await(), thw shutdown is call only after all taskas are completed
  2. even if the task is in progress it will send a signal and tasks in progress will be completed
  3. we do not need to block until threads are finished, this can be done asynchronously

Copy link
Member

Choose a reason for hiding this comment

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

True that, I missed the latch.

@gunnarmorling
Copy link
Member

Rebased and applied. Thanks, @jpechane!

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