On 5/9/2016 1:11 PM, tedsolr wrote:
> I have a development environment that is using an embedded zookeeper, and the
> zoo_data folder continues to grow. It's filled with snapshot files that are
> not getting purged. zoo.cfg has properties
> autopurge.snapRetainCount=10
> autopurge.purgeInterval=1
> Perhaps it's not in the correct location so its not getting read? Or maybe
> these props don't apply for embedded instances?
>
> Anyone know? Thanks!
> v5.2.1

Reading the source for the SolrZkServer class, it appears that only a
limited set of properties in that config file is parsed by the embedded
zookeeper.  Only these properties are used to configure the server, all
others are ignored:

server.*
group.*
weight.*
dataDir
dataLogDir
clientPort
tickTime
initLimit
syncLimit
electionAlg
maxClientCnxns

The reason that it ignores everything else is that this code is copied
from Zookeeper 3.2 -- which is over six years old.  Zookeeper did not
have snapshot purging functionality back then.

Although this is something we can fix by copying some of the code from
the latest Zookeeper into Solr and making some changes, the way Solr
implements the embedded zookeeper functionality will be susceptible to
similar problems in the future unless we upgrade zookeeper to 3.5.x and
change the embedded zookeeper implementation. ZK 3.5 is only available
as an alpha version, and may not be available in a stable version for a
few months.

You have mentioned that it's a dev environment.  A production
environment configured according to recommendations (no embedded
zookeeper) would not have this problem.

I would recommend scripting something yourself to clean up the zookeeper
data directory ... because even if we do fix this problem, the fix won't
likely be available in a regular Solr release for several weeks, and
will only be available in a new 6.x version, not anything in 4.x or 5.x.

Thanks,
Shawn

Reply via email to