There is a race condition here because the check if someting is complete and making the InternalDelegatingExecutionCallback isn't atomic.
So it could happen a single invocation future leads to multiple callidsequence completion. And the consequence is that the back pressure doesn't work for the client since you can get an increasing number of invocations.
I made some modifications to demonstrate the behavior:
And a demo program
When I run this program, I get the following output:
As can be seen, the call with id 2, is completed twice.
The text was updated successfully, but these errors were encountered: