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

Treat flushing state as terminal state if buffer is empty #22711

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdcmeehan
Copy link
Contributor

@tdcmeehan tdcmeehan commented May 9, 2024

Description

This brings the protocol designed in #21926 to be in line with expectations from the C++ implementation being worked on in #22697.

The new exchange protocol in #21926 expects the HEAD request to indicate the buffer is completed when the noMorePages signal has been set and the buffer is empty. This commit fixes the current behavior, which is that the coordinator expects at least one GET to transition the output buffer to completed state before returning that the buffer has been completed.

Motivation and Context

Complete the functionality in #21926.

Impact

Small behavior changes necessary for #21926.

Test Plan

Tests have been updated. There are no existing tests that make REST calls to underlying worker tasks, and this functionality will be covered by native integration tests once the protocol is updated in #21926.

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

The new exchange protocol in prestodb#21926 expects the HEAD
request to indicate the buffer is completed when
the noMorePages signal has been set and the buffer is
empty.  This commit fixes the current behavior, which
is that the coordinator expects at least one GET to
transition the output buffer to completed state before
returning that the buffer has been completed.
@tdcmeehan tdcmeehan requested a review from arhimondr May 10, 2024 14:36
@tdcmeehan tdcmeehan marked this pull request as ready for review May 10, 2024 14:36
arhimondr
arhimondr previously approved these changes May 13, 2024
@tdcmeehan
Copy link
Contributor Author

@arhimondr I removed the testing commit from @Yuhta but otherwise this PR is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants