[PATCH 1 of 3 V2] util: add method to hash nested combination of python data structures

Laurent Charignon lcharignon at fb.com
Mon Jul 20 11:38:18 CDT 2015


> On Jul 20, 2015, at 5:00 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> 
> On Sat, 18 Jul 2015 20:31:42 +0200, Pierre-Yves David wrote:
>> On 07/18/2015 06:52 AM, Yuya Nishihara wrote:
>>> Even if the server has the responsibility of checking dirty configs, it does
>>> not need hacks [1] to shut down by itself. Because the client have to know
>>> the server is dirty anyway, it can do kill-then-restart the server.
>> 
>> I think having the server responsible for shutting down make sense. I
>> also think we'll want server shutting down capability for other things
>> (as shutdown after a timeout)
> 
> Hmm, timeout can be a core commandserver function.
> 
>>> Also, it won't work if we want to restart the server when HGPLAIN is changed,
>>> for example.
>>> 
>>>  1. client: connect
>>>  2. master-server: check dirty
>>>  3. master-server: fork() child-server
>>>  4. master-server: shut down if dirty
>>>  5. child-server: tell client that master-server is shutting down if dirty
>>>  ...
>>>  6. client: send environment variables to child-server
>> 
>> environment variable will be an headache on their own. Do you think we 
>> should have a plan for them before moving forward?
> 
> No. I just came to the idea that it can be handled in a similar way:
> 
>  1. client: connect
>  2. server: fork child-server
>  3. client: send environment variables
>  4. client: ask if dirty
>  5. child-server: tell dirty if config, HG*, LC_*, etc. are changed
>  6. client: disconnect, kill and restart server, reconnect, ...

I am still concerned with the case of other clients connected to the server before step 6. The client cannot ignore that and kill the server, isn't it?

Thanks,

Laurent




More information about the Mercurial-devel mailing list