-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-2349:Update documentation for snapCount #349
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
Conversation
| file is created. The default snapCount is | ||
| 100,000.</para> | ||
| log. After the count of transactions which are written to a log | ||
| file exceed a runtime-set limit in [snapCount/2, snapCount),a snapshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an excellent documentation improvement, but we still may be able to phrase this in a clearer way. It may be good to reiterate that ZooKeeper writes to a transaction log between snapshotting here, so the reader understands the purpose of the snapCount.
Perhaps something like:
ZooKeeper records its transactions using snapshots and a transaction log (think write-ahead log). The number of transactions recorded in the transaction log before a snapshot can be taken (and the transaction log rolled) is determined by snapCount. In order to prevent all of the machines in the quorum from taking a snapshot at the same time, each ZooKeeper server will take a snapshot when the number of transactions in the transaction log reaches a runtime generated random value in the [snapCount/2, snapCount) range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- awesome suggestions. especially emphasizing the purpose of this snapshot strategy is to prevent all of the machines in the quorum from taking a snapshot at the same time
- done
Origin patch can not apply now and it has something inaccurate.so I give it a new PR. more details in [JIRA](https://issues.apache.org/jira/browse/ZOOKEEPER-2349) Author: maoling <maoling199210191@sina.com> Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org> Closes #349 from maoling/ZOOKEEPER-2349
Origin patch can not apply now and it has something inaccurate.so I give it a new PR. more details in [JIRA](https://issues.apache.org/jira/browse/ZOOKEEPER-2349) Author: maoling <maoling199210191@sina.com> Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org> Closes #349 from maoling/ZOOKEEPER-2349
Origin patch can not apply now and it has something inaccurate.so I give it a new PR. more details in [JIRA](https://issues.apache.org/jira/browse/ZOOKEEPER-2349) Author: maoling <maoling199210191@sina.com> Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org> Closes apache#349 from maoling/ZOOKEEPER-2349
Origin patch can not apply now and it has something inaccurate.so I give it a new PR. more details in [JIRA](https://issues.apache.org/jira/browse/ZOOKEEPER-2349) Author: maoling <maoling199210191@sina.com> Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org> Closes apache#349 from maoling/ZOOKEEPER-2349
Origin patch can not apply now and it has something inaccurate.so I give it a new PR.
more details in JIRA