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

Fix loss in segment announcements when segments do not fit in zNode #2266

Merged
merged 1 commit into from
Jan 15, 2016

Conversation

anubhgup
Copy link
Contributor

… znodes during compress mode.

@anubhgup anubhgup changed the title Fix for loss in segment announcements when segments do not fix in the… Fix for loss in segment announcements when segments do not fit in the… Jan 14, 2016
@xvrl
Copy link
Member

xvrl commented Jan 14, 2016

@anubhgup would you mind adding a unit test that exposes this problem? thanks!

@nishantmonu51
Copy link
Member

#2268 also seems to address same issue,
@anubhgup @navis, If they are duplicate, can you both sync up and close one of them.

@anubhgup
Copy link
Contributor Author

@navis @nishantmonu51

Some points in favour of this CL :)

  1. I had reported the bug on the Druid devlopment list, and also fixed it first.
    https://groups.google.com/forum/#!searchin/druid-development/from$3Ame/druid-development/OyiL8jC8fw8/1sW5oLCPBQAJ
  2. Since I am hitting it in my production setup, I should be able to test the fix also in production.

@drcrallen
Copy link
Contributor

@anubhgup does @navis 's test pass here?

@anubhgup
Copy link
Contributor Author

@drcrallen @navis I have added Navis's test to the CL. It is passing.

done = true;
} else {
availableZNodes.remove(availableZNode);
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@xvrl
Copy link
Member

xvrl commented Jan 14, 2016

@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?

@anubhgup
Copy link
Contributor Author

Added the log message changes.

@nishantmonu51
Copy link
Member

👍

@xvrl
Copy link
Member

xvrl commented Jan 14, 2016

👍 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).
@xvrl xvrl changed the title Fix for loss in segment announcements when segments do not fit in the… Fix loss in segment announcements when segments do not fit in zNode Jan 14, 2016
@xvrl
Copy link
Member

xvrl commented Jan 14, 2016

@navis any objections to merging this one instead of yours?

@navis
Copy link
Contributor

navis commented Jan 15, 2016

@xvrl No problem. It's my bad not checked it's already PRed. Thanks to all.

fjy added a commit that referenced this pull request Jan 15, 2016
Fix loss in segment announcements when segments do not fit in zNode
@fjy fjy merged commit a54c726 into apache:master Jan 15, 2016
fjy added a commit that referenced this pull request Jan 16, 2016
[backport #2266] Fix loss in segment announcements when segments do not fit in zNode
@gianm gianm mentioned this pull request Jan 26, 2016
@fjy fjy added this to the 0.8.3 milestone Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants