-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix loss in segment announcements when segments do not fit in zNode #2266
Conversation
@anubhgup would you mind adding a unit test that exposes this problem? thanks! |
Some points in favour of this CL :)
|
c9f7045
to
7932819
Compare
@drcrallen @navis I have added Navis's test to the CL. It is passing. |
done = true; | ||
} else { | ||
availableZNodes.remove(availableZNode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically we don't need to remove the node, since it is possible for another segment announcement to fit in there, just not this specific one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was debating about this too. I remove it because most announcements will have a similar size, unless there are significant schema changes across batches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just add a comment just to explain the reasoning.
@anubhgup @navis I don't have a strong preference on which PR to merge. The only difference is that @anubhgup removes a node on the list even if it could potentially be used for a different segment, although that might be unlikely if all announcements have comparable sizes. The only benefit I can see is that it would reduce the number of nodes to scan when deciding which node to add to. It may also increase the number of znodes in theory, but I'm not sure any of those things matter in practice. I like that @navis added the new vs. existing node in the logs. Since we already merged the test into this PR, we can probably add the log message changes and merge @anubhgup's since he first reported this issue? |
7932819
to
457ddd2
Compare
Added the log message changes. |
👍 |
👍 once we add a comment here https://github.com/druid-io/druid/pull/2266/files#r49796880 |
… znodes during compress mode. Added unit test (from Navis).
457ddd2
to
6d09ab8
Compare
@navis any objections to merging this one instead of yours? |
@xvrl No problem. It's my bad not checked it's already PRed. Thanks to all. |
Fix loss in segment announcements when segments do not fit in zNode
[backport #2266] Fix loss in segment announcements when segments do not fit in zNode
… znodes during compress mode.