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

为何SetMasterVariables、SetSystemVariables、SetMinChosenInstanceID总是同步写? #53

Closed
niukuo opened this issue Apr 20, 2017 · 2 comments

Comments

@niukuo
Copy link

niukuo commented Apr 20, 2017

看起来参数中是有WriteOptions的,为何不用WriteOptions中的选项而是直接将bSync传true?
//而且看起来MasterStateMachine :: UpdateMasterToStore中已经设置了oWriteOptions.bSync = false;实际却并没有起作用?
请问这里是基于什么样的考虑?

@niukuo
Copy link
Author

niukuo commented Apr 20, 2017

还有Database :: Put总是非同步写?

@lynncui00
Copy link
Collaborator

  • MasterVariables和SystemVariables是要严格同步写的,这部分外面控制的代码属于冗余代码,适时可以去掉。
  • 针对PaxosLog的写盘分为两部分,一个是leveldb的索引,一个是vfile的实际内容,而索引是可以通过vfile进行恢复的,所以不需要同步写。

具体还可参考 #45

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