lucene
lucene copied to clipboard
[LUCENE-13044][replicator] NRT add configurable commitData for Custom…
… security verification
Description
开放commitData的修改,可以自定义主从同步的安全机制
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!
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.
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中。
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!
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. */
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!