-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-17841][STREAMING][KAFKA] drain commitQueue #15407
Conversation
Test build #66609 has finished for PR 15407 at commit
|
Is there a test we can add to cover this? I realized "How was this patch tested?" was confusing. That was meant to ask how is the change tested itself, and a bug fix obviously can't be tested by existing unit tests. |
This doesn't affect correctness (only the highest offset for a given partition is used in any case), just memory leaks. I'm not sure what a good way to unit test memory leaks is, short of exposing the internal state of that queue, which seems less than optimal. |
Can you explain what is the memory that can currently leak with the iterator? |
@koeninger can you put more information into the description of the pull request? At the very least we should talk about the current implementation causes memory leaks. |
Thanks for the explanation. Merging in master/branch-2.0. |
## What changes were proposed in this pull request? Actually drain commit queue rather than just iterating it. iterator() on a concurrent linked queue won't remove items from the queue, poll() will. ## How was this patch tested? Unit tests Author: cody koeninger <cody@koeninger.org> Closes #15407 from koeninger/SPARK-17841. (cherry picked from commit cd106b0) Signed-off-by: Reynold Xin <rxin@databricks.com>
LGTM |
## What changes were proposed in this pull request? Actually drain commit queue rather than just iterating it. iterator() on a concurrent linked queue won't remove items from the queue, poll() will. ## How was this patch tested? Unit tests Author: cody koeninger <cody@koeninger.org> Closes apache#15407 from koeninger/SPARK-17841.
## What changes were proposed in this pull request? Actually drain commit queue rather than just iterating it. iterator() on a concurrent linked queue won't remove items from the queue, poll() will. ## How was this patch tested? Unit tests Author: cody koeninger <cody@koeninger.org> Closes apache#15407 from koeninger/SPARK-17841.
What changes were proposed in this pull request?
Actually drain commit queue rather than just iterating it.
iterator() on a concurrent linked queue won't remove items from the queue, poll() will.
How was this patch tested?
Unit tests