qubole / rubix

Cache File System optimized for columnar formats and object stores
Apache License 2.0
183 stars 74 forks source link

Reusing bookkeeperClient in CachingInputStream can cause errors like "out of sequence response" #305

Closed shubhamtagra closed 5 years ago

shubhamtagra commented 5 years ago

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.