Skip to content

Fix flaky testWriteDifferentSizes#11678

Merged
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:fix-flaky
Mar 28, 2022
Merged

Fix flaky testWriteDifferentSizes#11678
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:fix-flaky

Conversation

@linzebing
Copy link
Copy Markdown
Member

Description

#11607 we assert that query produces three files with sizes in different ranges. However it turned out that it's not deterministic, as row distribution between writers is not deterministic.

This PR addresses the flakiness by writing only one large row that exercises different code paths of S3 streaming upload.

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

Increase test coverage

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

trino-hive

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

Related issues, pull requests, and links

Address #11659

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`)

Comment on lines 273 to 279
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.

How are we sure that we will not get only small files if we end up having many writer tasks?
I am probably missing sth.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

My understanding even if we have multiple writer tasks, the distribution is still on a row-basis. Given that we write only one row, then there will be only one file.

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.

Oh yeah - sure :) Makes total sense.

@losipiuk losipiuk merged commit 515428c into trinodb:master Mar 28, 2022
@github-actions github-actions bot added this to the 375 milestone Mar 28, 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