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

Parallel Task Catalog Loading #20446

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

jklamer
Copy link
Member

@jklamer jklamer commented Jan 23, 2024

Description

Make Catalog loading for tasks

  • Concurrent across tasks
  • parallel within tasks

Additional context and related issues

Release notes

( X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

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

@cla-bot cla-bot bot added the cla-signed label Jan 23, 2024
@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from 9742d10 to 0b3a4e2 Compare January 23, 2024 21:27
@jklamer jklamer requested a review from dain January 23, 2024 22:29
@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from 0b3a4e2 to bd4afb8 Compare January 24, 2024 16:09
@jklamer jklamer requested a review from martint January 24, 2024 16:24
executor))
.collect(toImmutableList()));

var ignored = catalogsShutDown.run(() ->
Copy link
Member

Choose a reason for hiding this comment

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

Don't assign to a variable if it isn't going to be used.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was the result of some error prone check with this as the suggested fix. I'll see what I can do to remove.

Copy link
Member Author

Choose a reason for hiding this comment

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

With the changing of the logging structure I just made each shutdown async and I block on none of them. Let me know if that's a little too radical or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh it still yelled even when submitting inside a forEach. Gonna try the annotation approach

Copy link
Member Author

Choose a reason for hiding this comment

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

I had to do something very silly here. Let me know what you think.

@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from bd4afb8 to 4518e4e Compare January 26, 2024 03:34
@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch 2 times, most recently from f8068f8 to 7d451ca Compare January 26, 2024 04:25
@jklamer jklamer requested review from martint and dain January 26, 2024 04:27
catalogLoadingExceptions.add(e);
}
}
catch (TimeoutException | InterruptedException e) {
Copy link
Member

Choose a reason for hiding this comment

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

The thread interrupted state is being swallowed here. It needs to be restored or the method needs to throw an exception.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure I know enough about restoring the interrupted thread here to know how I might do that. Right now the behavior is to put the exception in the list and throw if there are any exceptions loading any of the catalogs. Is that sub optimal? Or should I just throw immediately in this case (and with what runtime exception)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Believe this is handled now.

@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from 7d451ca to fd47661 Compare February 9, 2024 17:17
@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from fd47661 to 0d3acbd Compare February 12, 2024 16:20
@jklamer jklamer force-pushed the jklamer/ParrallelTaskCatalogLoading branch from 0d3acbd to d83f65f Compare February 12, 2024 16:26
@jklamer jklamer requested a review from martint February 12, 2024 16:27
@martint martint merged commit a8d96d7 into trinodb:master Feb 13, 2024
92 checks passed
@jklamer jklamer deleted the jklamer/ParrallelTaskCatalogLoading branch February 13, 2024 16:33
@github-actions github-actions bot added this to the 439 milestone Feb 13, 2024
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