Skip to content

Conversation

@maoling
Copy link
Member

@maoling maoling commented Aug 25, 2017

Origin patch can not apply now and it has something inaccurate.so I give it a new PR.
more details in JIRA

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
Copy link
Contributor

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.

Copy link
Member Author

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

@asfgit asfgit closed this in 563f892 Sep 11, 2017
asfgit pushed a commit that referenced this pull request Sep 11, 2017
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
asfgit pushed a commit that referenced this pull request Sep 11, 2017
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
@hanm
Copy link
Contributor

hanm commented Sep 11, 2017

Committed to master 563f892,
branch-3.5 4051b38,
branch-3.4 574a94d

lvfangmin pushed a commit to lvfangmin/zookeeper that referenced this pull request Jun 17, 2018
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
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Sep 3, 2022
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
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

Successfully merging this pull request may close these issues.

3 participants