Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 11394 invoked by uid 500); 19 Sep 2001 14:51:17 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11376 invoked from network); 19 Sep 2001 14:51:17 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Ryan Bloom Reply-To: rbb@covalent.net Organization: Covalent Technologies To: dev@httpd.apache.org, Greg Stein Subject: Re: New post-log-transaction hook? Date: Wed, 19 Sep 2001 07:52:24 -0700 X-Mailer: KMail [version 1.3] References: <20010917155221.A15053@covalent.net> <017001c14078$0a54fe40$96c0b0d0@roweclan.net> <20010918180937.K2914@lyra.org> In-Reply-To: <20010918180937.K2914@lyra.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20010919145224.7EBE846DFC@koj.rkbloom.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tuesday 18 September 2001 06:09 pm, Greg Stein wrote: > I agree with OtherBill. > > Cleanups are not always the answer. When they are run, many things > associated with that pool could be torn down already because their cleanups > have already run. > > If you need a known state to perform *operations* (as it sounds like Jon is > doing), then you can't use a cleanup. > > Hooks are orderable, but more importantly: they run at a specified time. In > this case, before the pool is cleaned up. > > Lingering close should not be part of the connection pool cleanup. It is a > specific action that needs to occur *before* we are done with the > connection pool. That is why Bill's suggestion of running it as a hook is > great. It also gives people a chance to perform actions relative to that > close and before pool cleanup occurs. Jon is already using a pool cleanup to solve this problem. In fact, his initial thought was to use a pool cleanup, but he couldn't register cleanups from within a cleanup. Adding a new hook was a second solution from Jon, because he just needed to solve his problem. We are adding things just to add them. I have yet to see a need for this new hook. Ryan > On Tue, Sep 18, 2001 at 02:20:35PM -0500, William A. Rowe, Jr. wrote: > > From: "Ryan Bloom" > > Sent: Tuesday, September 18, 2001 11:44 AM > > > > > On Tuesday 18 September 2001 08:17 am, William A. Rowe, Jr. wrote: > > > > Why not let the MPM register the lingerclose with APR_HOOK_MIDDLE in > > > > the post_connection hook? That way, if Jon's (or any other author's) > > > > intent is to work before the lingering close, then it can be > > > > APR_HOOK_FIRST. Otherwise register it APR_HOOK_LAST. > > > > > > It shouldn't be a hook. This should just be done with a pool cleanup. > > > Hooks aren't the answer to every problem in the server. Doing > > > something after a specific action, like the close of the connection > > > should be done by registering a pool cleanup. Fix the bug that you > > > can't register a cleanup within a cleanup, and Jon's problem goes away > > > completely, because he can use the cleanup that he is already using. > > > > The pool cleanup has one disadvantage (assuming the register cleanup > > within cleanup bug is fixed), the order of cleanups is a strict LIFO. > > > > There _may_ be an advantage to an orderable hook. At this point I agree, > > fix the register cleanup in cleanup bug, let Jon experiment with that > > solution, and then argue the merits for a new hook. > > > > Bill -- ______________________________________________________________ Ryan Bloom rbb@apache.org Covalent Technologies rbb@covalent.net --------------------------------------------------------------