lucene icon indicating copy to clipboard operation
lucene copied to clipboard

[LUCENE-13044][replicator] NRT add configurable commitData for Custom…

Open dianjifzm opened this issue 1 year ago • 4 comments

… security verification

Description

开放commitData的修改,可以自定义主从同步的安全机制

dianjifzm avatar Jan 29 '24 04:01 dianjifzm

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Feb 13 '24 00:02 github-actions[bot]

Hi @dianjifzm! Can you give more context for what you're trying to do? I passed the PR description through Google Translate, but it wasn't enough for me to understand how this is helpful.

stefanvodita avatar Feb 13 '24 10:02 stefanvodita

Hi @dianjifzm! Can you give more context for what you're trying to do? I passed the PR description through Google Translate, but it wasn't enough for me to understand how this is helpful.

在业务开发过程中,有时为了故障恢复,有时是为了abtest,经常会发生replica切换primary的情况。 目前primary和replica之间主要靠primaryGen做安全验证,这个机制并不可靠。 只要primary的primaryGen大于replica的primaryGen,索引同步就会发生。 而新的primary与replica的索引类型可能都不相同,数据也可能不一致。 为了避免此类问题的发生,就需要自定义的主从验证机制,而这个机制需要放到commitData中。

dianjifzm avatar Feb 16 '24 12:02 dianjifzm

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Mar 02 '24 00:03 github-actions[bot]

I think this is a reasonable hook to add, but could you maybe add javadocs to the new protected method? Maybe something like:

    /** Applications can subclass and override this method to customize what it stored in commitData for each commit. */

mikemccand avatar Apr 11 '24 12:04 mikemccand

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

github-actions[bot] avatar Apr 26 '24 00:04 github-actions[bot]