[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085744#comment-14085744
 ] 

Hongchao Deng commented on ZOOKEEPER-1994:
------------------------------------------

I rethought the version thing a bit more.
It seems to me too hackish to parse the "version" number from filename.
My original proposal was to have some sort of backup with a history view. The 
reason I suggest separating version out is that I am concerned when users copy 
dynamic files around and boot it up, they didn't realize the version inside is 
important. I was suggesting to separate version apart to another related file, 
and if a dynamic file doesn't have any version related to it, it is version 0.

I don't know where to go here. As a compromise to what we have done so far, I 
would like to keep "version" still in dynamic file and everything is still what 
[~shralex] suggested:
1. have version appended to filename (not parsed from filename)
2. update static config to point to new dynamic file.


> Backup config files.
> --------------------
>
>                 Key: ZOOKEEPER-1994
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1994
>             Project: ZooKeeper
>          Issue Type: Improvement
>    Affects Versions: 3.5.0
>            Reporter: Hongchao Deng
>            Assignee: Hongchao Deng
>             Fix For: 3.5.1
>
>         Attachments: draft.patch, first-try.patch, static-backup.patch
>
>
> We should create a backup file for a static or dynamic configuration file 
> before changing the file. 
> Since the static file is changed at most twice (once when removing the 
> ensemble definitions, at which point a dynamic file doesn't exist yet, and 
> once when removing clientPort information) its probably fine to back up the 
> static file independently from the dynamic file. 
> To track backup history:
> Option 1: we could have a .bakXX extention for backup where XX is a  sequence 
> number. 
> Option 2: have the configuration version be part of the file name for dynamic 
> configuration files (instead of in the file like now). Such as 
> zoo_replicated1.cfg.dynamic.1000000 then on reconfiguration simply create a 
> new dynamic file (with new version) and update the link in the static file to 
> point to the new dynamic one.
> Review place:
> https://reviews.apache.org/r/24208/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to