scwhittle opened a new pull request, #41820:
URL: https://github.com/apache/beam/pull/41820

   Previously, DirectStreamObserver only checked CallStreamObserver.isReady() 
once every 100 messages (DEFAULT_MAX_MESSAGES_BEFORE_CHECK), which allowed 
large amounts of memory to be buffered when messages were large.
   
   Configure gRPC's per-RPC onReadyThreshold on client stubs instead and check 
isReady() on every message when enabled:
   - Add OutboundObserverFactory.clientDirect(int onReadyThresholdBytes), 
withOnReadyThresholdBytes(int), and a stub-aware outboundObserverFor overload 
that sets AbstractStub.withOnReadyThreshold(...) (overriding any existing 
threshold with a warning) and configures DirectStreamObserver with 
maxMessagesBeforeCheck=0. Setting the threshold to 0 preserves the previous 
periodic message-count check without modifying the stub.
   - Add per-stream SdkHarnessOptions:
     - --dataDirectStreamOnReadyThresholdBytes (default 100 MiB)
     - --stateDirectStreamOnReadyThresholdBytes (default 100 MiB)
     - --controlDirectStreamOnReadyThresholdBytes (default 20 MiB)
     - --loggingDirectStreamOnReadyThresholdBytes (default 20 MiB)
   - Wire client-side FnApi streams (data, state, control, and logging) in 
FnHarness and BeamFnLoggingClient to use the stub-aware path and their 
respective options.
   
   <!--
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    - [ ] Replace these instructions with a description of your change and why 
you have made it.
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123` or `fixes #456`).
    - [ ] Update `CHANGES.md` with noteworthy changes.
   
   See [CONTRIBUTING.md]() for more details.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to