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

KAFKA-13231; TransactionalMessageCopier.start_node should wait until the process if fully started #11264

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

dajac
Copy link
Contributor

@dajac dajac commented Aug 26, 2021

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@dajac
Copy link
Contributor Author

dajac commented Aug 26, 2021

Copy link
Contributor

@hachikuji hachikuji left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -159,12 +159,16 @@ def pids(self, node):
def alive(self, node):
return len(self.pids(node)) > 0

def start_node(self, node):
BackgroundThreadService.start_node(self, node)
wait_until(lambda: self.alive(node), timeout_sec=60, err_msg="Message Copier failed to start")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth adding node to these error messages?

@dajac
Copy link
Contributor Author

dajac commented Aug 26, 2021

@hachikuji updated the PR to add the node to the error message.

@dajac
Copy link
Contributor Author

dajac commented Aug 26, 2021

@dajac dajac merged commit c4e1e23 into apache:trunk Aug 27, 2021
@dajac dajac deleted the KAFKA-13231 branch August 27, 2021 06:28
dajac added a commit that referenced this pull request Aug 27, 2021
…l the process if fully started (#11264)

This patch ensures that the transaction message copier is fully started in `start_node`. Without this, it is possible that `stop_node` is called before the process is started which results in not stopping it at all.

Reviewers: Jason Gustafson <jason@confluent.io>
dajac added a commit that referenced this pull request Aug 27, 2021
…l the process if fully started (#11264)

This patch ensures that the transaction message copier is fully started in `start_node`. Without this, it is possible that `stop_node` is called before the process is started which results in not stopping it at all.

Reviewers: Jason Gustafson <jason@confluent.io>
@dajac
Copy link
Contributor Author

dajac commented Aug 27, 2021

Merged to trunk, 3.0 and 2.8.

xdgrulez pushed a commit to xdgrulez/kafka that referenced this pull request Dec 22, 2021
…l the process if fully started (apache#11264)

This patch ensures that the transaction message copier is fully started in `start_node`. Without this, it is possible that `stop_node` is called before the process is started which results in not stopping it at all.

Reviewers: Jason Gustafson <jason@confluent.io>
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

Successfully merging this pull request may close these issues.

2 participants