Will anything bad happen if I make the config file read-only for zookeeper? I assume the design goals here were:

* atomic rewrites of the dynamic config, preserving historic files

* ability for zookeeper to know which was the most recent config file on restart


Those goals are a bit unnecessary for me. I don't really care about historic configuration, so just writing to a temp file and moving over the existing one would work great. Alternatively tracking the current file in memory without rewriting the zoo.cfg would also be great, since I don't care about the effort on startup to rediscover peers.

Is there a way to get Zookeeper to play better with not rewriting its own config file for my use case?


Ari


On 12/12/19 5:53am, Alexander Shraer wrote:
It will change, the number represents the version of the configuration, and
will be updated if you issue a reconfiguration command. Its basically the
zxid of the command.


Alex

On Tue, Dec 10, 2019 at 11:25 PM Aristedes Maniatis <[email protected]> wrote:

On 11/12/19 6:21pm, [email protected] wrote:
Hey Ari,

I directly used the filename   zoo.cfg.dynamic.100000000    and never
had a
problem.
Arne

Hmmm... that's an oddly obvious answer. I just assumed the 100000000
would change randomly. What's even the point of it?


Ari


Reply via email to