> -----Original Message-----
> From: Yann Ylavic [mailto:[email protected]]
> Sent: Mittwoch, 2. September 2015 11:08
> To: [email protected]
> Subject: Balancers (file based SHMs) and restart issue (Windows only?)
> 
> Re PR 58024.
> 
> AIUI, balancers (and members) SHM slots are destroyed (and the
> underlying base file removed) with pconf before restarting and then
> re-created after (according to the new configuration, eg. number of
> balancers/members, be it the same or not).
> Persisted slots are saved in their own file (with the .persit suffix),
> and reused (copied) only if the configuration did not change in
> between.
> (@Jim, I see now how this is better than attaching ;)
> 
> This works well on Unixes, but on Windows files can't be removed
> (unlinked) while any process/thread hold an HANDLE on it, hence until
> all the children have exited...
> Thus, since the SHM files still exist on restart, the balancer code
> tries to attach them instead of re-creating, and issues the checks on
> the existing size to fit the reloaded configuration, and fail should
> should any balancer/member be added or removed => PR 58024.
> 
> BTW, even on Unixes there is a race on these files between the main
> process and the children, or the children themselves from different
> "generation".

Really? I would think that these are files with the same name but different 
inodes and hence different.

Regards

Rüdiger


Reply via email to