Closed
Description
Version
4.2
Summary
When using batching as documented:
apolloClientBuilder.httpBatching(
maxBatchSize = 10
)
We expected the requests batched would be at most of size 10, but in reality it could exceed the size limit and causing error.
Steps to reproduce the behavior
Steps to Reproduce:
- Set maxBatchSize = 10
- Fire 20 concurrent requests quickly
- Observe the 413 error.
Checking the source code here: BatchingHttpInterceptor
We found when the batch is full and wants to send the requests, the lock actually could not be acquired, due to its still be owned by more requests doing adding to the list.