Skip to content

Fix scheduling for splits with locality requirement in Tardigrade#11581

Merged
arhimondr merged 5 commits intotrinodb:masterfrom
arhimondr:scheduling-fixes
Mar 22, 2022
Merged

Fix scheduling for splits with locality requirement in Tardigrade#11581
arhimondr merged 5 commits intotrinodb:masterfrom
arhimondr:scheduling-fixes

Conversation

@arhimondr
Copy link
Copy Markdown
Contributor

@arhimondr arhimondr commented Mar 19, 2022

Description

Fixes several problems related to scheduling of non remotely accessible splits

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Core engine (Tardigrade)

How would you describe this change to a non-technical end user or system administrator?

Fixes scheduling for non remotely accessible splits in certain corner cases. Prior this fix in some queries scanning over non remotely accessible splits might've been failing.

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

() No release notes entries required.
(x) Release notes entries required with the following suggested text:

# Tardigrade
* Fix scheduling for non remotely accessible splits 

@cla-bot cla-bot bot added the cla-signed label Mar 19, 2022
@arhimondr arhimondr force-pushed the scheduling-fixes branch 2 times, most recently from 3b17f93 to 473aea1 Compare March 21, 2022 17:56
@arhimondr arhimondr requested review from linzebing and losipiuk March 21, 2022 17:59
@arhimondr arhimondr changed the title [WIP] Various scheduling related fixes for Tardigrade Fix scheduling for splits with locality requirement in Tardigrade Mar 21, 2022
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

would that make sense to have more than one partition on single node?

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.

Hmm, interesting question. For example to make tasks smaller for more granular retries?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah for example. For partitions, we should probably opt for those to be similarly sized. Building partitions on top of the enforced bucket<->node mapping does not necessarily imply that. Not something that we need to address here. Just a random thought.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems existingRequirement will have at most one element. Then we don't really need a set?

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.

A split has a list of hosts in it's requirement. The set is needed to support split specific requirements.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it' beneficial to add a comment explaining the logic, e.g. "make sure all buckets mapped to the same node map to the same partition, such that locality requirements are respected in scheduling".

Otherwise queries like "SHOW TABLES" won't work
Make it consistent with locality requirements defined in splits
To allow scheduling of coordinator only tasks and splits
@arhimondr arhimondr merged commit d877d73 into trinodb:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants