phantom
phantom copied to clipboard
RS: BatchActor over-subscribes if flushInterval is used
Using the flushInterval will lead to less than batchSize elements being written in a batch, but when processing the ResultSet a full batchSize is requested from upstream, leading to unbounded growth of outstanding work (by violating the concurrentRequests limit).
The BatchActor will have to keep track of the size of each write batch and then only request that number of new elements when the database result comes back.