Skip to content

Implement full query retries#9361

Merged
martint merged 14 commits intotrinodb:masterfrom
arhimondr:implement-full-query-retries
Dec 10, 2021
Merged

Implement full query retries#9361
martint merged 14 commits intotrinodb:masterfrom
arhimondr:implement-full-query-retries

Conversation

@arhimondr
Copy link
Copy Markdown
Contributor

No description provided.

@cla-bot cla-bot bot added the cla-signed label Sep 23, 2021
@findepi findepi added the enhancement New feature or request label Sep 24, 2021
@arhimondr arhimondr force-pushed the implement-full-query-retries branch 5 times, most recently from cb59a15 to 85a65d8 Compare September 30, 2021 23:00
@arhimondr arhimondr force-pushed the implement-full-query-retries branch 5 times, most recently from 5073a17 to 26683f4 Compare October 8, 2021 21:41
@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 26683f4 to 62909ad Compare October 12, 2021 01:30
@arhimondr arhimondr force-pushed the implement-full-query-retries branch 3 times, most recently from 164a687 to 47c3589 Compare October 13, 2021 15:58
@arhimondr arhimondr changed the title [WIP] Implement full query retries Implement full query retries Oct 13, 2021
@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 47c3589 to 5f71b9f Compare October 20, 2021 17:15
@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 5f71b9f to 29fd74a Compare November 5, 2021 01:34
@arhimondr arhimondr requested a review from martint November 5, 2021 01:36
@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 29fd74a to 21fc3ba Compare November 5, 2021 18:31
@arhimondr arhimondr mentioned this pull request Nov 10, 2021
31 tasks
Copy link
Copy Markdown
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

Editorials for prefix.

@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 21fc3ba to 5f2daa5 Compare November 15, 2021 16:59
}

SerializedPage page = pagesIterator.next();
pagesIterator.remove();
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 costly is this one? Given you are using ArrayListMultimap it feels like it may be O(sth^2). Hard to figure out from the code though.

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.

Yeah, you are right, not sure what I was thinking :-) Let me switch it to LinkedListMultimap for now. It could be optimized further though. However I'm not sure if it makes sense to overspend time on this implementation as with adding spilling capabilities it may change.

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.

Assuming the query state remains RUNNING during this delay period, is there some easy way to tell from the web ui that the query is waiting for a retry and not just stuck due to some issue ?

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.

During the delay between attempts all stages will be in a "PENDING" state. This indicates that no active tasks are currently running in a stage. We have a separate work item to update UI to make it easier to identify failures and retries.

@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 9bb0034 to ffb1d69 Compare December 6, 2021 18:07
@arhimondr
Copy link
Copy Markdown
Contributor Author

Updated

@losipiuk losipiuk force-pushed the implement-full-query-retries branch from ffb1d69 to 9cb85d7 Compare December 8, 2021 14:24
@losipiuk
Copy link
Copy Markdown
Member

losipiuk commented Dec 8, 2021

Just a rebase

@arhimondr arhimondr force-pushed the implement-full-query-retries branch from 9cb85d7 to 9fe5d6a Compare December 8, 2021 21:55
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.

Can we have this class extend AbstractTestQueryFramework ?
Although I've made the changes for that in arhimondr@eca47a9 , it would be nice to have it in this commit itself

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.

That's a good idea. However I would prefer to keep the abstract QueryRunner createQueryRunner(List<TpchTable<?>> requiredTpchTables, Map<String, String> configProperties, Map<String, String> coordinatorProperties) method. It makes it more clear at the interface level what tables must be provisioned and what configuration must be set when creating a query runner.

Extract buffering related code under an interface. It will unblock
introducing different buffering strategies without a need to make
schanges to the ExchangeClient itself
This is a preparation for introducing task level retries.

This PR removes "all-or-nothing" execution assumption from SqlStageExecution.
Scheduling related assumptions of pipelined execution are now moved to
the PipelinedStageExecution. SqlStageExecution is now merely a container
for scheduled tasks for a particular stage. It's main responsibility now
is to keep track of running tasks and collect their execution
statistics.
Move responsibility of opening a split source from planning phase to
execution phase to allow reopening split source on query retries
Copy link
Copy Markdown
Member

@raunaqmorarka raunaqmorarka left a comment

Choose a reason for hiding this comment

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

lgtm

@martint martint merged commit baadcdd into trinodb:master Dec 10, 2021
@github-actions github-actions bot added this to the 366 milestone Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

6 participants