Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule coordinator stage after creating distributed stages scheduler #10640

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

losipiuk
Copy link
Member

If coordinator stage is running and fails while distributed stages scheduler
is being created we can get unexpected failures from the latter routine.
The race between handling failure of coordinator stage and code run from
createDistributedStagesScheduler may result in the failures of SPI
calls called by the latter; and propagating those failures as top-level
query failure.

E.g. for queries which read Hive we observed the exceptions from
HiveSplitManager.getSplits() to be set as top-level query failures after
coordinator stage failure, because currentQueryId was unset in
SemiTransactionalHiveMetastore as part of coordinator failure handling.

Defering start of coordinator stage does not solve the problem totally
but changes the probability of occurence.

If coordinator stage is running and fails while distributed stages scheduler
is being created we can get unexpected failures from the latter routine.
The race between handling failure of coordinator stage and code run from
createDistributedStagesScheduler may result in the failures of SPI
calls called by the latter; and propagating those failures as top-level
query failure.

E.g. for queries which read Hive we observed the exceptions from
HiveSplitManager.getSplits() to be set as top-level query failures after
coordinator stage failure, because `currentQueryId` was unset in
SemiTransactionalHiveMetastore as part of coordinator failure handling.

Defering start of coordinator stage does not solve the problem totally
but changes the probability of occurence.
@losipiuk losipiuk merged commit 89ab4db into trinodb:master Jan 18, 2022
@github-actions github-actions bot added this to the 369 milestone Jan 18, 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.

2 participants