Versions Compared

Key

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

...

Because the new added mirror.support.unclean.leader.election config is a dynamic configuration, it could be enabled in the middle of the mirroring, not at the beginning of the mirroring. If it is enabled at the beginning of the mirroring, all records will guarantee be guaranteed to be consistent between these 2 clusters even if unclean leader election happened. But if it is enabled in the middle of the mirroring, the guarantee becomes:

...

For example, cluster A enables unclean leader election for this topic. And during the log truncation for LMLE 1 at [(2) LMLE 1], the mirror.support.unclean.leader.election is false, and it this is enabled after [(2) LMLE 1] truncation completed, thenIn this case, we will make sure guarantee that all records after next LMLE truncation, i.e. [(4) LMLE 5], will be consistent in the 2 clusters. 

...

The reason of the guarantee is because the unclean leader truncation in cluster could happen after [(4) LMLE: 5] truncation completed like below image. The leader epoch 5 for offset 2 ~ 5 in the non-ISR log didn't get truncated in [(2) LMLE: 1] process, so it causes inconsistent data before [(4) LMLE: 5] (i.e. offset 5). But after [(4) LMLE: 5], all records (or more specifically, all leader epochs) will be consistent with the cluster B because of log truncation are done in "all replicas".

...