Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This change is backwards compatible. If the current leader information aren’t set in the ProduceResponse or FetchResponse, then the client falls back to the original behaviour of waiting for the metadata to be refreshed and consistent through the Metadata RPC call.

Rejected Alternatives

Another For a produce-request, another idea considered was to fetch new leader on the client using the usual Metadata RPC call, once produce request -batch fails with NOT_LEADER_OR_FOLLOWER or FENCED_LEADER_EPOCH. And save time on the client by avoiding the static retry delay(RETRY_BACKOFF_MS_CONFIG) on a failed request, instead retry immediately as soon as possible when the new leader is available for the partition. Consider the total time taken for a produce-path, when leader changes -

...