We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug (描述bug) 一个新启动的chunkserver,初始epoch_为0。假设在0-T时间内发生了两次的transfer_leader行为,则epoch_会变为2。紧接着到了snapshot的触发时间,开始做snapshot,epoch_被持久化到文件。 假设在raft未完成log删除之前chunkserver断电又快速重启了,重启后的chunkserver在on_snapshot_load中会从文件中加载epoch_,然后回放raft log,回放完成后epoch_会变为4。 这里不应该是4应该是2。导致的后果是同一个raft group的其它Node上报的数据由于epoch较小会被忽略。
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本) OS: Compiler: branch: commit id:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered:
@historyliao
Sorry, something went wrong.
@historyliao transfer leader 不会经过配置变更,所以 epoch 不会增加 重启之后,从 snapshot load 之后,只回放 snapshot index 之后的 raft log
第2点你说的对,所以这个epoch更新没问题。 不过第1点 transfer leader是会导致重新选举产生新term的,配置会变更,实际测试也是这样。
@historyliao transfer leader 不会经过配置变更,所以 epoch 不会增加 重启之后,从 snapshot load 之后,只回放 snapshot index 之后的 raft log 第2点你说的对,所以这个epoch更新没问题。 不过第1点 transfer leader是会导致重新选举产生新term的,配置会变更,实际测试也是这样。
第 1 点是在重新选举出 leader 之后,需要提交一个 NOOP 才能提供服务,braft 在实现的时候,利用一个空的配置变更实现的(A,B,C) -> (A,B,C),所以导致了 epoch 增加。
Cyber-SiKu
No branches or pull requests
Describe the bug (描述bug)
一个新启动的chunkserver,初始epoch_为0。假设在0-T时间内发生了两次的transfer_leader行为,则epoch_会变为2。紧接着到了snapshot的触发时间,开始做snapshot,epoch_被持久化到文件。 假设在raft未完成log删除之前chunkserver断电又快速重启了,重启后的chunkserver在on_snapshot_load中会从文件中加载epoch_,然后回放raft log,回放完成后epoch_会变为4。 这里不应该是4应该是2。导致的后果是同一个raft group的其它Node上报的数据由于epoch较小会被忽略。
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本)
OS:
Compiler:
branch:
commit id:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: