You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/02/10 16:29:07 UTC

svn commit: r1069428 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/mpm/prefork/prefork.c

Author: jim
Date: Thu Feb 10 15:29:07 2011
New Revision: 1069428

URL: http://svn.apache.org/viewvc?rev=1069428&view=rev
Log:
  *) prefork: Update MPM state in children during a graceful restart.
       Allow the HTTP connection handling loop to terminate early 
            during a graceful restart.  PR 41743.
                 [Andrew Punch <andrew.punch 247realmedia.com>]


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1069428&r1=1069427&r2=1069428&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Feb 10 15:29:07 2011
@@ -1,12 +1,22 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.18
 
+  *) prefork: Update MPM state in children during a graceful restart.
+     Allow the HTTP connection handling loop to terminate early 
+     during a graceful restart.  PR 41743.
+     [Andrew Punch <andrew.punch 247realmedia.com>]
+
   *) mod_ssl: Correctly read full lines in input filter when the line is
      incomplete during first read. PR 50481. [Ruediger Pluem]
 
   *) mod_autoindex: Merge IndexOptions from server to directory context when
      the directory has no mod_autoindex directives. PR 47766. [Eric Covener]
 
+  *) prefork: Update MPM state in children during a graceful restart.
+     Allow the HTTP connection handling loop to terminate early 
+     during a graceful restart.  PR 41743.
+     [Andrew Punch <andrew.punch 247realmedia.com>]
+
   *) mod_cache: Make sure that we never allow a 304 Not Modified response
      that we asked for to leak to the client should the 304 response be
      uncacheable. PR45341 [Graham Leggett]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1069428&r1=1069427&r2=1069428&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Feb 10 15:29:07 2011
@@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * prefork: Update MPM state in children; implement fast exit from
-    connection loop via ap_graceful_stop_signalled.  PR 41743.
-    Trunk patch: http://svn.apache.org/viewvc?rev=1068389&view=rev
-    2.2.x patch: https://issues.apache.org/bugzilla/attachment.cgi?id=26623
-    +1: jorton, rpluem, jim
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c?rev=1069428&r1=1069427&r2=1069428&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c (original)
+++ httpd/httpd/branches/2.2.x/server/mpm/prefork/prefork.c Thu Feb 10 15:29:07 2011
@@ -330,6 +330,7 @@ static void just_die(int sig)
 
 static void stop_listening(int sig)
 {
+    mpm_state = AP_MPMQ_STOPPING;
     ap_close_listeners();
 
     /* For a graceful stop, we want the child to exit when done */
@@ -350,6 +351,7 @@ static void sig_term(int sig)
          */
         return;
     }
+    mpm_state = AP_MPMQ_STOPPING;
     shutdown_pending = 1;
     is_graceful = (sig == AP_SIG_GRACEFUL_STOP);
 }
@@ -363,6 +365,7 @@ static void restart(int sig)
         /* Probably not an error - don't bother reporting it */
         return;
     }
+    mpm_state = AP_MPMQ_STOPPING;
     restart_pending = 1;
     is_graceful = (sig == AP_SIG_GRACEFUL);
 }
@@ -458,8 +461,10 @@ static int num_listensocks = 0;
 
 int ap_graceful_stop_signalled(void)
 {
-    /* not ever called anymore... */
-    return 0;
+    /* Return true if the server is stopping for whatever reason; the
+     * function is used to initiate a fast exit from the connection
+     * processing loop. */
+    return mpm_state == AP_MPMQ_STOPPING;
 }
 
 



Re: svn commit: r1069428 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/mpm/prefork/prefork.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Feb 10, 2011, at 2:05 PM, Jeff Trawick wrote:

> On Thu, Feb 10, 2011 at 12:05 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>> Yeah... I need to check my merge script and figure out why
>> it does that.
>> 
>> Sorry...
> 
> Thanks :)   BTW, Joe's svn.merge seems to work fine.
> 

But his doesn't handle cases where one needs to recreate the SVN commit
message (no clog)... :/

Re: svn commit: r1069428 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/mpm/prefork/prefork.c

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Feb 10, 2011 at 12:05 PM, Jim Jagielski <ji...@jagunet.com> wrote:
> Yeah... I need to check my merge script and figure out why
> it does that.
>
> Sorry...

Thanks :)   BTW, Joe's svn.merge seems to work fine.

Re: svn commit: r1069428 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/mpm/prefork/prefork.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
Yeah... I need to check my merge script and figure out why
it does that.

Sorry...

On Feb 10, 2011, at 11:01 AM, Jeff Trawick wrote:

> On Thu, Feb 10, 2011 at 10:29 AM,  <ji...@apache.org> wrote:
>> Author: jim
>> Date: Thu Feb 10 15:29:07 2011
>> New Revision: 1069428
>> 
>> URL: http://svn.apache.org/viewvc?rev=1069428&view=rev
>> Log:
>>  *) prefork: Update MPM state in children during a graceful restart.
>>       Allow the HTTP connection handling loop to terminate early
>>            during a graceful restart.  PR 41743.
>>                 [Andrew Punch <andrew.punch 247realmedia.com>]
> 
> Jim, have you noticed this indentation issue sometimes when you
> backport?  With some longer logs it is pretty annoying ;)
> 


Re: svn commit: r1069428 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS server/mpm/prefork/prefork.c

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Feb 10, 2011 at 10:29 AM,  <ji...@apache.org> wrote:
> Author: jim
> Date: Thu Feb 10 15:29:07 2011
> New Revision: 1069428
>
> URL: http://svn.apache.org/viewvc?rev=1069428&view=rev
> Log:
>  *) prefork: Update MPM state in children during a graceful restart.
>       Allow the HTTP connection handling loop to terminate early
>            during a graceful restart.  PR 41743.
>                 [Andrew Punch <andrew.punch 247realmedia.com>]

Jim, have you noticed this indentation issue sometimes when you
backport?  With some longer logs it is pretty annoying ;)