Treat flushing state as terminal state if buffer is empty #22711
+43
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Release Notes