Skip to content

Commit 81a5f36

Browse files
omerhadariods
andauthored
1115.bugfix: Make KafkaStorageError retriable after metadata refresh (#1115)
* Make KafkaStorageError retriable after metadata refresh This is how it is in the java implementation and in kafka-python [Java Implementation](https://kafka.apache.org/30/javadoc/org/apache/kafka/common/errors/KafkaStorageException.html) ``` Client should request metadata update and retry if the response shows KafkaStorageException ``` [kafka-python](https://github.com/dpkp/kafka-python/blob/20e2d52ff2c337e02f8bac7af6c6e8d00ebcc63f/kafka/errors.py#L546) ```Python class KafkaStorageError(BrokerResponseError): errno = 56 message = 'KAFKA_STORAGE_ERROR' description = 'Disk error when trying to access log file on the disk.' retriable = True invalid_metadata = True ``` * Update CHANGES.rst * Fix formatting --------- Co-authored-by: Denis Otkidach <[email protected]>
1 parent c4b6040 commit 81a5f36

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Improved Documentation:
1111
(pr #1068 by @jzvandenoever)
1212
* Fix Java Client API reference (pr #1069 by @emmanuel-ferdman)
1313

14+
15+
Bugfixes:
16+
17+
* Make KafkaStorageError retriable after metadata refresh like in other
18+
implementations (pr #1115 by @omerhadari)
19+
20+
1421
Misc:
1522
* Use SPDX license expression for project metadata.
1623

aiokafka/errors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,9 @@ class OperationNotAttempted(BrokerResponseError):
740740
class KafkaStorageError(BrokerResponseError):
741741
errno = 56
742742
message = "KAFKA_STORAGE_ERROR"
743-
description = "The user-specified log directory is not found in the broker config."
743+
description = "Disk error when trying to access log file on the disk."
744+
retriable = True
745+
invalid_metadata = True
744746

745747

746748
class LogDirNotFound(BrokerResponseError):

0 commit comments

Comments
 (0)