Versions Compared

Key

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

...

In addition to these conditions, the replica manager will also park fetch requests if the remote replica's HWM is less greater than or equal to the local replica's HWM.

Sending

When sending FETCH requests the replica will include its HWM in the FETCH request's HighWatermark field. If the remote replica support version 18 of the RPC the HWM will be serialized. If the remote replica doesn't support version 18 the HighWatermark field in the field will ignored and not serialized.

...

Replicas that do not support version 18 of FETCH will send the previous version without the HighWatermark field. The default value for the HighWatermark field will be the maximum value of int64 (9223372036854775807). This means that from the leader's point of view the remote replica's HWM will always be greater that its HWM so the leader will never park complete a FETCH request because of the value HWM. This is the behavior prior to this KIP.

If the remote replica supports version 18 of FETCH but the leader does not, the HighWatermark field will be ignored. The leader will handle the FETCH request as implemented in previous versions of KRaftKafka.

Test Plan

For KRaft, this feature will mainly be tested using the KRaft protocol unittests as supported in KafkaRaftClientFetchTest.

...