Aiven-Open / tiered-storage-for-apache-kafka

RemoteStorageManager for Apache Kafka® Tiered Storage
Apache License 2.0
91 stars 19 forks source link

Handle interruptions during fetching log segment #462

Closed ivanyu closed 9 months ago

ivanyu commented 10 months ago

This commit addresses the fact that the fetching stream can be interrupted by the broker. In this case, we return an empty stream to prevent useless logging of InterruptedException and ClosedByInterruptException.

jeqo commented 9 months ago

As a note, this is only handling the scenarios when is interrupted while fetching log or segment manifest. It can still be badly propagated if it fails when fetching an index as it's handled by a synchronous caffeine implementation on the broker side. Though this would require better exception handling on the API and broker side to be solved as proposed here https://lists.apache.org/thread/8slfhqmwml1xnjmxy8v5jb7d1tq44fsx