ZooKeeper stores the entire database in memory. Logs are for durability only. ZNodes exist until deleted.
-Jordan > On Mar 18, 2016, at 11:38 AM, ibrahim El-sanosi <[email protected]> > wrote: > > Thank you for replaying. > > > Take this example, Zookeeper started on 1/1/2015, and assume ZK servers are > never crashed. Also, the ZK are very busy, reciveing continusly write > requests from clients and accordingly snapshots are generated overtime. On > 1/3/2015, what Znodes will be in memory data tree? do all Znodes still > store in memory (from 1/1/2015 to 1/3/2015) as there is no crashed occur. > Or Dsnapshhot is taken the data tree is > > > Note that I am not asking about data in log or snapshoot. I am asking > about the current data in memory. > > On Fri, Mar 18, 2016 at 4:12 PM, Flavio Junqueira <[email protected]> wrote: > >> Hi Ibrahim, >> >> Are you asking about how we compact old logs? We do it by taking snapshots >> so that upon recovery, we only load the latest snapshot and replay the txn >> log from the snapshot tag. The snapshot tag is the last zxid committed when >> we start producing the snapshot. >> >> We don't actually delete anything, though, unless you intentionally turn >> on auto purge: >> >> https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_administering >> < >> https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_administering >>> >> >> -Flavio >> >>> On 18 Mar 2016, at 16:05, ibrahim El-sanosi <[email protected]> >> wrote: >>> >>> Hi all, >>> >>> Assume the Zookeeper have been running for about one year (from 1/1/2015 >>> until now), how does ZooKeeper deal with old delivered write requests (To >>> optimize a memory used) (say from 1/1/2015 to 03/04/2015). I am assuming >>> the old delivered request are no longer used. >>> >>> On the other words, what strategy ZK does to find and delete unused >> Znodes? >>> >>> Ibrahim >> >>
