pfcoperez commented on pull request #1785:
URL: https://github.com/apache/zookeeper/pull/1785#issuecomment-995650110


   > Thanks for the patch @pfcoperez !! A few generic comments:
   
   Huge thanks for taking the time to review the patch.
   
   > 
   >     * this really helps only if you have a very specific problem, when you 
deleted all the snapshots and transaction log files by accident on all the 
ZooKeeper servers. I don't know if we should really support this edge case. 
(see the discussion on the Jira item)
   > 
   
   I came with one example in the Jira issue but there are surely other 
situations where I find this useful. However, I'd perfectly understand if you 
disregarded this feature. Myself and other workmates would find it quite handy.
   
   I've tested trying to restore trees using production data (quite big trees 
containing several GBs of data) snapshots, without translog files and I've not 
found problem in restoring at least partial data so far. I know it is a matter 
of chance but leaning probability to success certain disastrous situations is a 
huge step.
   
   >     * I sense a potential vulnerability here. Taking a snapshot is heavy 
on the disk I/O. Also these files can be quite large. One could kill the node 
by sending "snap" commands with telnet in a loop.
   
   On one hand, I had this though myself and that's why I think this should 
never be part  of the default whitelisted commands. On the other, I would be 
quite worried about ZK installations with serving ports exposed to the public. 
   
   >     * since ZooKeeper 3.5 we have two diagnostic APIs: the old telnet 
4-letter-words (we want to deprecate later I think) and the new http AdminAPI. 
In general we should make sure the new commands end up in both interfaces. 
(assuming we don't think this is a security risk... I'm not sure if we have any 
authentication on the REST admin API, and I would rather not let anyone 
creating snapshots without some authentication)
   
   If you folks think this feature has any chance of eventually getting merged, 
I'd be delighted to add the REST API counterpart of this command. In fact I 
might do that anyway soon.


-- 
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-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to