Skip to content
New issue

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

书籍中 278页 应用日志是异步操作 放在了更新日志之后,确保应用日志时候不会发生问题;但最新的代码替换了操作的顺序 #6

Open
renxinlin opened this issue Aug 14, 2020 · 1 comment

Comments

@renxinlin
Copy link

applySnapshot(newSnapshot);
replaceSnapshot(newSnapshot);

请问改写了顺序后这里是同步的操作了吗,的目的是?

@xnnyygn
Copy link
Owner

xnnyygn commented Aug 18, 2020

理论上不会有问题,只要替换了日志快照,状态机可以从这个日志快照中恢复,不管异步的日志应用操作成功与否。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants