Skip to content

Obtain and refresh sink instance handle asynchronously#15870

Merged
losipiuk merged 5 commits intotrinodb:masterfrom
losipiuk:lo/future-sink-instance-handle
Feb 1, 2023
Merged

Obtain and refresh sink instance handle asynchronously#15870
losipiuk merged 5 commits intotrinodb:masterfrom
losipiuk:lo/future-sink-instance-handle

Conversation

@losipiuk
Copy link
Copy Markdown
Member

Description

It is not always possible for exchange implementation to
provide an immediate return for calls to:

  • Exchange.instantiateSink and
  • Exchange.updateSinkInstanceHandle

depending on exchange implementation sometimes there needs to be a network
the communication involved or another lengthy process. To allow for such
exchange implementations and not block engine threads this PR changes
SPI so the two methods listed above now return
CompletableFuture<ExchangeSinkInstanceHandle>.

Release notes

(x) This is not user-visible or 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:

@cla-bot cla-bot bot added the cla-signed label Jan 26, 2023
@losipiuk losipiuk changed the title Lo/future sink instance handle Obtain and refresh sink instance handle asynchronously Jan 26, 2023
@losipiuk losipiuk force-pushed the lo/future-sink-instance-handle branch 3 times, most recently from d5ba4a9 to 2721958 Compare January 26, 2023 21:21
@losipiuk losipiuk marked this pull request as ready for review January 27, 2023 01:29
@arhimondr arhimondr self-requested a review January 30, 2023 16:32
@arhimondr
Copy link
Copy Markdown
Contributor

The implementation looks reasonable, however there are test failures. There's nothing obvious I can see being wrong right away though.

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.

Reason for timeout to be different from DeduplicatingDirectExchangeBuffer?

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.

This class will be gone. DOes not matter

@losipiuk losipiuk force-pushed the lo/future-sink-instance-handle branch 2 times, most recently from d0917c3 to ef9a33a Compare January 30, 2023 17:26
Copy link
Copy Markdown
Contributor

@arhimondr arhimondr left a comment

Choose a reason for hiding this comment

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

LGTM % comments

@losipiuk losipiuk force-pushed the lo/future-sink-instance-handle branch from ef9a33a to 7530326 Compare January 30, 2023 20:00
@losipiuk losipiuk requested a review from arhimondr January 30, 2023 20:00
It is not always possible for exchange implementation to
provide an immediate return for calls to:
* `Exchange.instantiateSink `and
* `Exchange.updateSinkInstanceHandle`

depending on exchange implementation sometimes there needs to be a network
the communication involved or another lengthy process. To allow for such
exchange implementations and not block engine threads this PR changes
SPI so the two methods listed above now return
`CompletableFuture<ExchangeSinkInstanceHandle>`.
@losipiuk losipiuk force-pushed the lo/future-sink-instance-handle branch from 7530326 to 45c51c3 Compare January 31, 2023 16:31
@losipiuk losipiuk merged commit 9f1e41b into trinodb:master Feb 1, 2023
@github-actions github-actions bot added this to the 407 milestone Feb 1, 2023
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