Skip to content

Fix loadstatus?full double counting expected segments#5667

Merged
nishantmonu51 merged 2 commits intoapache:masterfrom
dclim:loadstatus-fix
Apr 23, 2018
Merged

Fix loadstatus?full double counting expected segments#5667
nishantmonu51 merged 2 commits intoapache:masterfrom
dclim:loadstatus-fix

Conversation

@dclim
Copy link
Copy Markdown
Contributor

@dclim dclim commented Apr 22, 2018

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:

  • Load interval 2018-01-01/P1M in hot tier
  • Load forever in cold tier

loadstatus?full would 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.

@dclim dclim added the Bug label Apr 22, 2018
@dclim dclim added this to the 0.12.1 milestone Apr 22, 2018
Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (also, neat)

Copy link
Copy Markdown
Member

@nishantmonu51 nishantmonu51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nishantmonu51 nishantmonu51 merged commit 55b003e into apache:master Apr 23, 2018
@dclim dclim deleted the loadstatus-fix branch April 23, 2018 19:52
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants