datastax / starlight-for-kafka

DataStax - Starlight for Kafka
Apache License 2.0
17 stars 12 forks source link

Use retry-able error codes for fetch failures (FETCH_SESSION_ID_NOT_FOUND instead of UNKNOWN_SERVER_ERROR) #98

Closed zzzming closed 5 months ago

zzzming commented 5 months ago

With the proxy configuration, restarting the broker triggers SERVER_UNKNOWN_ERROR that is not a retry-able error. This behaves differently than the Kafka broker restarts. In order to retry, update some errors codes to retry-able FETCH error codes.

Error codes' retry-able column is described at https://kafka.apache.org/protocol#protocol_error_codes

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 54.46%. Comparing base (f65b9bc) to head (9172fd8).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/datastax/starlight-for-kafka/pull/98/graphs/tree.svg?width=650&height=150&src=pr&token=1ZCKF7NTSM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datastax)](https://app.codecov.io/gh/datastax/starlight-for-kafka/pull/98?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datastax) ```diff @@ Coverage Diff @@ ## 2.10_ds #98 +/- ## ========================================== Coverage 54.46% 54.46% Complexity 118 118 ========================================== Files 19 19 Lines 940 940 Branches 80 80 ========================================== Hits 512 512 Misses 411 411 Partials 17 17 ```
eolivelli commented 5 months ago

please port to the 3.1_ds branch as well cc @nicoloboschi @nikhil-ctds

eolivelli commented 5 months ago

an alternative that we could try is KAFKA_STORAGE_ERROR