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-7620: Fix restart logic for TTLs in WorkerConfigTransformer #5914

Closed
wants to merge 3 commits into from

Conversation

rayokota
Copy link
Contributor

The restart logic for TTLs in WorkerConfigTransformer was broken when trying to make it toggle-able. Accessing the toggle through the Herder causes the same code to be called recursively. This fix just accesses the toggle by simply looking in the properties map that is passed to WorkerConfigTransformer.

Committer Checklist (excluded from commit message)

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

@rayokota rayokota changed the title KAFKA-7620: Fix restart logic for TTLs KAFKA-7620: Fix restart logic for TTLs in WorkerConfigTransformer Nov 14, 2018
@rayokota
Copy link
Contributor Author

@ewencp , could I kindly get a review? Thanks in advance!

Copy link
Contributor

@mageshn mageshn left a comment

Choose a reason for hiding this comment

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

Thanks, @rayokota. This looks good to me. I had a couple of minor questions/comments.

@rayokota
Copy link
Contributor Author

Thanks @mageshn ! I've incorporated your feedback.

Copy link
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

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

Looks close, just a couple small comments.

@rayokota
Copy link
Contributor Author

@ewencp , thanks for the review! I've incorporated your feedback. Let me know if there are any other changes you would like.

Copy link
Contributor

@ewencp ewencp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix. Best part is that this turned into a net negative LOC change in a bug fix :) Merging back through 2.0 branch

ewencp pushed a commit that referenced this pull request Nov 28, 2018
The restart logic for TTLs in `WorkerConfigTransformer` was broken when trying to make it toggle-able.   Accessing the toggle through the `Herder` causes the same code to be called recursively.  This fix just accesses the toggle by simply looking in the properties map that is passed to `WorkerConfigTransformer`.

Author: Robert Yokota <rayokota@gmail.com>

Reviewers: Magesh Nandakumar <magesh.n.kumar@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5914 from rayokota/KAFKA-7620

(cherry picked from commit a2e87fe)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
ewencp pushed a commit that referenced this pull request Nov 28, 2018
The restart logic for TTLs in `WorkerConfigTransformer` was broken when trying to make it toggle-able.   Accessing the toggle through the `Herder` causes the same code to be called recursively.  This fix just accesses the toggle by simply looking in the properties map that is passed to `WorkerConfigTransformer`.

Author: Robert Yokota <rayokota@gmail.com>

Reviewers: Magesh Nandakumar <magesh.n.kumar@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5914 from rayokota/KAFKA-7620

(cherry picked from commit a2e87fe)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>
@ewencp ewencp closed this in a2e87fe Nov 28, 2018
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
The restart logic for TTLs in `WorkerConfigTransformer` was broken when trying to make it toggle-able.   Accessing the toggle through the `Herder` causes the same code to be called recursively.  This fix just accesses the toggle by simply looking in the properties map that is passed to `WorkerConfigTransformer`.

Author: Robert Yokota <rayokota@gmail.com>

Reviewers: Magesh Nandakumar <magesh.n.kumar@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes apache#5914 from rayokota/KAFKA-7620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants