dcacace-goog opened a new pull request, #41937: URL: https://github.com/apache/beam/pull/41937
When `BoundedQueueExecutor` reaches its item or byte limit, `execute()` blocks the calling thread until a worker thread finishes a bundle. Because `ComputationState.activateWork()` calls `execute()` synchronously from the GetWork gRPC receive callback, a full queue stalls the gRPC reader thread, so items still buffered in the stream miss heartbeats, expire on Windmill, and get retried. This adds an opt-in non-blocking reservation path without changing default behavior: - Split `BoundedQueueExecutor` limits into soft targets and hard caps (hard caps stay at 1x target here). - Add `tryReserve()` / `cancelReserve()` / `executeReserved()`, keeping the hardMax/target ratio when `setMaximumPoolSize()` scales capacity. - Add `ComputationState.tryActivateWork()`, which reserves executor budget before activating work, releases it on STALE/DUPLICATE/purged work, and rolls back `ActiveWorkState` if `executeReserved()` throws. - Gate it behind Streaming Engine and the `streaming_engine_getwork_budgeting` experiment (off by default). addresses #41928 -- 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]
