KAFKA-4547: Avoid unnecessary offset commit that could lead to an invalid offset position if partition is paused#2341
Conversation
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
@hachikuji I submitted this PR without test(s) in case it needs to be included in 0.10.2.0. I'll work on creating some tests after I'm done with the PR for KIP-88. |
There was a problem hiding this comment.
Can we use "has" for consistency?
There was a problem hiding this comment.
Sure, I'll update it.
There was a problem hiding this comment.
"for the given partitions"?
e88617d to
2330bcf
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Seems we could simplify this by delegating to the other method.
There was a problem hiding this comment.
Or maybe we don't even need this method anymore (haven't checked)
There was a problem hiding this comment.
I submitted an update that refactors the original method. I'd be happy to take your second suggestion too if you think that's a better way to go. Thanks.
There was a problem hiding this comment.
If it's used, we can keep it. I wasn't sure, so thought I'd mention it.
2330bcf to
d95ff3b
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
d95ff3b to
ffdb19c
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
@hachikuji @vahidhashemian Please note that I've updated the affected versions to 0.10.0.2 and 0.10.1.0, 0.10.1.1. When we merge a fix, we want to make sure it makes it onto branches 0.10.0, 0.10.1, 0.10.2, and trunk. |
|
@vahidhashemian The fix looks good, but can you add a couple test cases? |
ffdb19c to
0426eab
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
0426eab to
d040ff7
Compare
There was a problem hiding this comment.
Thanks for adding the test. Would be good to have a more focused test in FetcherTest as well for the change there.
There was a problem hiding this comment.
Sure, I'll try to add that too. Thanks for the quick feedback.
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
@ewencp does it affect 0.10.0.2 as well? The reporter suggested that 0.10.0.1 worked fine while 0.10.1.0 did not, so I was wondering if you had additional information than what was in the JIRA. |
…alid offset position if partition is paused
d040ff7 to
ea08690
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Could we have one more test case similar to this, but in which the paused partition already has a position? This verifies that updateFetchPositions does not overwrite the current position.
There was a problem hiding this comment.
Sure. I'll add one more. Thanks.
f2540d5 to
fbdb44d
Compare
There was a problem hiding this comment.
nit: if you use Utils.mkSet, then you won't need the conversion below.
fbdb44d to
81dfc01
Compare
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
LGTM. I think @ijuma is right that this only needs to go into 0.10.1 and 0.10.2. |
…ed offsets Author: Vahid Hashemian <vahidhashemian@us.ibm.com> Reviewers: Jason Gustafson <jason@confluent.io> Closes #2341 from vahidhashemian/KAFKA-4547
|
@vahidhashemian Merged to trunk and 0.10.2. Unfortunately, it doesn't merge cleanly onto 0.10.1. Would you mind submitting a separate PR to that branch? |
|
@hachikuji Definitely. |
…ed offsets Author: Vahid Hashemian <vahidhashemian@us.ibm.com> Reviewers: Jason Gustafson <jason@confluent.io> Closes apache#2341 from vahidhashemian/KAFKA-4547
No description provided.