Skip to content

Fix SourceDistributionTaskSource#getMoreTasks#12248

Merged
arhimondr merged 1 commit intotrinodb:masterfrom
arhimondr:fix-flaky-test
May 5, 2022
Merged

Fix SourceDistributionTaskSource#getMoreTasks#12248
arhimondr merged 1 commit intotrinodb:masterfrom
arhimondr:fix-flaky-test

Conversation

@arhimondr
Copy link
Copy Markdown
Contributor

Description

In some cases the last task containing the last batch of splits may not
have been created.

This happened when the last split batch happend to return enough splits
for a single task to be created, but not enough to create two full tasks
and when the in a mean time the isFinished flag changed from false
to true before the second isFinished check was executed.

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 (fault tolerant execution)

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

In certain rare cases queries running with fault tolerant execution enabled could return incorrect results

Related issues, pull requests, and links

Issue: #11825
Previous (incomplete) attempt of a fix: #11870

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

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

# Section
* Fix some things. ({issue}`issuenumber`)

In some cases the last task containing the last batch of splits may not
have been created.

This happened when the last split batch happend to return enough splits
for a single task to be created, but not enough to create two full tasks
and when the in a mean time the `isFinished` flag changed from `false`
to `true` before the second `isFinished` check was executed.
@arhimondr arhimondr requested a review from losipiuk May 4, 2022 22:28
@cla-bot cla-bot bot added the cla-signed label May 4, 2022
@arhimondr arhimondr merged commit 70b7bd4 into trinodb:master May 5, 2022
@arhimondr arhimondr deleted the fix-flaky-test branch May 5, 2022 15:33
@github-actions github-actions bot added this to the 380 milestone May 5, 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