Skip to content

MSQ: Fix task lock checking during publish, fix lock priority.#13282

Merged
cryptoe merged 7 commits intoapache:masterfrom
gianm:msq-fix-lock-stuff
Nov 8, 2022
Merged

MSQ: Fix task lock checking during publish, fix lock priority.#13282
cryptoe merged 7 commits intoapache:masterfrom
gianm:msq-fix-lock-stuff

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Oct 28, 2022

Fixes two issues:

  1. ControllerImpl did not properly check the return value of
    SegmentTransactionalInsertAction when doing a REPLACE. This could cause
    it to not realize that its locks were preempted.

  2. Task lock priority was the default of 0. It should be the higher
    batch default of 50. The low priority made it possible for MSQ tasks
    to be preempted by compaction tasks, which is not desired.

Fixes two issues:

1) ControllerImpl did not properly check the return value of
   SegmentTransactionalInsertAction when doing a REPLACE. This could cause
   it to not realize that its locks were preempted.

2) Task lock priority was the default of 0. It should be the higher
   batch default of 50. The low priority made it possible for MSQ tasks
   to be preempted by compaction tasks, which is not desired.
@gianm gianm added Bug Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 28, 2022
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@cryptoe cryptoe left a comment

Choose a reason for hiding this comment

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

Minor nit: LGTM otherwise.

@Override
public int getPriority()
{
return getContextValue(Tasks.PRIORITY_KEY, Tasks.DEFAULT_BATCH_INDEX_TASK_PRIORITY);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍 updated.

@cryptoe cryptoe merged commit 48528a0 into apache:master Nov 8, 2022
@cryptoe
Copy link
Copy Markdown
Contributor

cryptoe commented Nov 8, 2022

LGTM thanks @gianm 🚀

@kfaraz kfaraz added this to the 25.0 milestone Nov 22, 2022
@gianm gianm deleted the msq-fix-lock-stuff branch March 29, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants