Fix IllegalArgumentException in TaskLockBox.syncFromStorage() on rolling update#6050
Merged
jihoonson merged 1 commit intoapache:masterfrom Jul 27, 2018
Merged
Fix IllegalArgumentException in TaskLockBox.syncFromStorage() on rolling update#6050jihoonson merged 1 commit intoapache:masterfrom
jihoonson merged 1 commit intoapache:masterfrom
Conversation
jon-wei
approved these changes
Jul 27, 2018
clintropolis
approved these changes
Jul 27, 2018
jihoonson
added a commit
to jihoonson/druid
that referenced
this pull request
Jul 27, 2018
jihoonson
added a commit
that referenced
this pull request
Jul 27, 2018
jihoonson
added a commit
to implydata/druid-public
that referenced
this pull request
Jul 27, 2018
leventov
pushed a commit
to metamx/druid
that referenced
this pull request
Aug 3, 2018
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.
The prioritized locking was introduced in 0.12.0 (#4550). So, when updating a Druid cluster from some old version before 0.12.0 to 0.12.x, both tasks and taskLocks in metastore don't have priority values.
However, this introduces two different priority values for task and taskLock. The priority is an int member variable of
TaskLock, so it is initialized to 0 when it's deserialized if priority doesn't exist in the serialized locks. But, the priority is a variable of taskContext inTask, and its default value varies depending on the task type.This PR fixes this bug as below:
I modified
OverlordTestto check the task has the priority in the context once it is submitted to overlord's endpoint.Also, I have changed the default priority of
NoopTaskfrom 0 to 50. This causes the same exception inTaskLockBoxTest.testSyncFromStorage()without this PR.This should be included to 0.12.2 since it's a regression.