Skip to content

1115.bugfix: Make KafkaStorageError retriable after metadata refresh#1115

Merged
ods merged 3 commits intoaio-libs:masterfrom
omerhadari:fix/align-kafka-storage-error-with-other-implementations
Jul 19, 2025
Merged

1115.bugfix: Make KafkaStorageError retriable after metadata refresh#1115
ods merged 3 commits intoaio-libs:masterfrom
omerhadari:fix/align-kafka-storage-error-with-other-implementations

Conversation

@omerhadari
Copy link
Copy Markdown
Contributor

@omerhadari omerhadari commented Jul 15, 2025

This error is supposed to be automatically retried by clients, but currently it is not.

This is how it is in the java implementation and in kafka-python

Java Implementation

Client should request metadata update and retry if the response shows KafkaStorageException

kafka-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

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
```
@omerhadari omerhadari changed the title bugfix: Make KafkaStorageError retriable after metadata refresh 1115.bugfix: Make KafkaStorageError retriable after metadata refresh Jul 15, 2025
@omerhadari omerhadari force-pushed the fix/align-kafka-storage-error-with-other-implementations branch from 31f7350 to 0e72db2 Compare July 15, 2025 14:39
@omerhadari
Copy link
Copy Markdown
Contributor Author

Hi @ods, any chance this could get reviewed and a version released? Sorry for tagging you directly. We are getting errors in production which we have to bypass in ways that don't respect other client configs (e.g. request_timeout_ms).
Felt like this one is important because of the difference compared to the Java and other implementations.

Thank you!

@ods
Copy link
Copy Markdown
Collaborator

ods commented Jul 19, 2025

Hi @omerhadari! Thanks for the contribution, looks good to me.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (c4b6040) to head (0e72db2).

❗ There is a different number of reports uploaded between BASE (c4b6040) and HEAD (0e72db2). Click for more details.

HEAD has 60 uploads less than BASE
Flag BASE (c4b6040) HEAD (0e72db2)
cext 26 11
purepy 26 11
integration 32 2
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1115      +/-   ##
==========================================
- Coverage   95.08%   85.95%   -9.14%     
==========================================
  Files         114      114              
  Lines       16981    16983       +2     
  Branches     1579     1579              
==========================================
- Hits        16146    14597    -1549     
- Misses        486     1994    +1508     
- Partials      349      392      +43     
Flag Coverage Δ
cext 85.90% <100.00%> (-8.99%) ⬇️
integration 85.82% <100.00%> (-9.01%) ⬇️
purepy 85.90% <100.00%> (-8.99%) ⬇️
unit 53.10% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ods ods merged commit 81a5f36 into aio-libs:master Jul 19, 2025
@omerhadari
Copy link
Copy Markdown
Contributor Author

Thank you so much! Will there be a release soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants