Fix loadstatus?full double counting expected segments#5667
Merged
nishantmonu51 merged 2 commits intoapache:masterfrom Apr 23, 2018
dclim:loadstatus-fix
Merged
Fix loadstatus?full double counting expected segments#5667nishantmonu51 merged 2 commits intoapache:masterfrom dclim:loadstatus-fix
nishantmonu51 merged 2 commits intoapache:masterfrom
dclim:loadstatus-fix
Conversation
sathishsri88
pushed a commit
to sathishs/druid
that referenced
this pull request
May 8, 2018
* fix loadstatus?full double counting expected segments * remove possible flakiness from Thread.sleep() in test
gianm
pushed a commit
to implydata/druid-public
that referenced
this pull request
May 16, 2018
* fix loadstatus?full double counting expected segments * remove possible flakiness from Thread.sleep() in test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If more than one load rule applies to a segment, the first one that applies will take effect and the remainder will be ignored. However, the logic in
getReplicationStatus()used by loadstatus?full was such that it would calculate expected segments based on all the rules that applied, leading to counts based on segments being expected to be also loaded according to lesser priority rules. Hence, if you had something like this:Segments:
2018-01-01/2018-01-02
2018-01-02/2018-01-03
2017-01-01/2017-01-02
And your load rules were:
loadstatus?fullwould show:{"hot":{"datasource":0},"cold":{"datasource":2}}Test took about a hundred times longer than the fix.
Recommend for backport to 0.12.1 since a broken loadstatus potentially affects monitoring and rolling update scripting and the fix is low risk.