Versions Compared

Key

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

...

Because the new added mirror.support.unclean.leader.election config 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 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 records after next log truncation for LMLE will be consistent. 

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

Image Added


The reason of the guarantee is because the unclean leader truncation in cluster could happen after (4) LMLE 5 truncation 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 LMLE 5. But after LMLE 5, all records will be consistent with the cluster B because of log truncation are done in "all replicas".

Image AddedImage Removed