You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apply gRPC flow control to binary store uploads #1923
DaprPreviewClient.setBinaryFile reads the whole content Flux at once and passes every chunk to gRPC without checking isReady(). If the content is produced faster than the network sends it, gRPC holds the rest in memory. The Javadoc states this as a known limit, and so does #1870.
getBinaryFile already avoids this for downloads: it asks gRPC for a message only when the subscriber has demand. Upload should do the same in the other direction:
Register setOnReadyHandler in ClientResponseObserver.beforeStart.
Request one content chunk at a time, and only while isReady() is true.
Use prefetch 1 in the step that splits content into 32 KiB chunks.
No public API change.
#1870 says crypto encrypt has the same limit; it could follow the same approach.
Release Note
RELEASE NOTE: UPDATEsetBinaryFile applies gRPC flow control to uploads.
I would like to work on this. Proposed approach, for a maintainer to confirm before I open a pull request:
In DaprBinaryFileClient.setBinaryFile, pass a ClientResponseObserver and register setOnReadyHandler in beforeStart.
Replace the anonymous content subscriber with a small private subscriber class that requests one chunk at a time, and only while isReady() is true. It asks again after each chunk is sent and each time gRPC becomes ready.
Pass prefetch 1 to concatMapIterable, so at most one content chunk waits to be split.
Update the setBinaryFile Javadoc in DaprPreviewClient, and add a unit test next to getBinaryFileBackpressureTest.
No public API change. Crypto encrypt is left out of this change.
If this looks right, could a maintainer assign the issue to me?
Activity
yangding14 commentedon Nov 30, 2026
I would like to work on this. Proposed approach, for a maintainer to confirm before I open a pull request:
DaprBinaryFileClient.setBinaryFile, pass aClientResponseObserverand registersetOnReadyHandlerinbeforeStart.isReady()is true. It asks again after each chunk is sent and each time gRPC becomes ready.concatMapIterable, so at most one content chunk waits to be split.setBinaryFileJavadoc inDaprPreviewClient, and add a unit test next togetBinaryFileBackpressureTest.No public API change. Crypto
encryptis left out of this change.If this looks right, could a maintainer assign the issue to me?