Fix loss in segment announcements when segments do not fit in zNode#2266
Fix loss in segment announcements when segments do not fit in zNode#2266fjy merged 1 commit intoapache:masterfrom anubhgup:fix-announce
Conversation
|
@anubhgup would you mind adding a unit test that exposes this problem? thanks! |
|
Some points in favour of this CL :)
|
|
@drcrallen @navis I have added Navis's test to the CL. It is passing. |
There was a problem hiding this comment.
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.
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.
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? |
|
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).
|
@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.