We use the same instance of BookkeeperClient for the lifetime of CachingInputStream. This can cause problems in some cases like when first call on client times out and then we make another call, in such case we can get errors like "out of sequence response" when previous calls' response (call that timed out) is received after second call is made.
As a solution, we should catch all instances of exception around client calls and close-recreate client in catch.
We use the same instance of BookkeeperClient for the lifetime of CachingInputStream. This can cause problems in some cases like when first call on client times out and then we make another call, in such case we can get errors like "out of sequence response" when previous calls' response (call that timed out) is received after second call is made.
As a solution, we should catch all instances of exception around client calls and close-recreate client in catch.