Ian Holsman wrote:
>
> >
> > Jim Jagielski wrote:
> > >
> > > Seems to me, this will break gracefull restarts
> >
>
> Don't we have a 'generation' number on each process?
yep.
> maybe there could be something at the thread level which says what generation it is
>using.
> so when a gracefull restart happens, as each thread gets notified, and finishes it's
>current
> request it will bump up it's generation count.
I don't think you could easily do the generation stuff at the thread
level, because all threads within a process share a given config, server
structure, vhost structures, etc. Doing it at the process level like we
do today would be much easier.
>
> then you have a GC thread/process (also fired off by the graceful restart) which is
>responsbible for
> dealloctating the sharedmemory (or any other resource needed to be cleaned up). It
>would wake up
> every second, look to see if there are any threads still on the generation it cared
>about, and
> if not it would be safe to deallocate the resource.
yep, but just on processes, not on threads. I would suggest just
writing a little scoreboard GC function that gets called by
process_idle_server_maintenance - runs every second in the parent
already.
>
> or am I missing something?
I think you're right on the money, except for the thread vs. process
stuff.
Greg