zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] fantapsody commented on pull request #1704: Add command to force a zookeeper server to take a snapshot
Date Tue, 07 Sep 2021 13:03:10 GMT

fantapsody commented on pull request #1704:
URL: https://github.com/apache/zookeeper/pull/1704#issuecomment-914288146

   > For this PR:
   > * Look at the command naming: `force_snapshot`(semantic ambiguity), it seems like
that when using this command, users can force the server to take a snapshot immediately.
   > * However, this PR just sets a flag:`forceSnapshot` and we cannot control the timing
of snapshot(we cannot know when the server will take a snapshot). When there're no write requests
during that period, the snapshot cannot never be triggered.
   > * Another important things is: when the server is taking a snapshot, we should not
allow another process to take snapshot which will put too much pressure on the server. This
PR also cannot guarantee this?
   > * I have some thoughts for this topic: `Backup and recovery`. I will sort it out and
share it here at this weekend(08-28)
   Hi @maoling , thanks for the comments! The PR is designed to reuse the logic in `SyncRequestProcessor`
so there is a single point in the program that takes the snapshot, it surely is a "best-effort"
approach that cannot guarantee a snapshot would be taken immediately if there is no more writes
to it, but I think it works in common use cases. We can also improve the implementation https://github.com/apache/zookeeper/blob/1e74a3395a9c3c4d67093f9a073bffb5a176916c/zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java#L190
 in follow-up PRs to make sure only a single snapshot is taken at a time as this is an existing
issue that could be triggered if it takes too long to take the snapshot and the `snapCount`
or `snapSizeInBytes` is small enough. And there might be potentially other usages in operations
other than backup & restore.
   BTW, `backup and recovery` is a very important topic for zookeeper, do you have any updates
on it?

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:

View raw message