← Back to team overview

launchpad-dev team mailing list archive

Re: Connections left open after switching to read only mode

 

On May 8, 2010, at 8:34 AM, Stuart Bishop wrote:

> On Fri, May 7, 2010 at 8:28 PM, Guilherme Salgado <salgado@xxxxxxxxxxxxx> wrote:
> 
>> The latter should work as long as the ROMDP returns the romode store
>> (pointing to the standalone DB) rather than the regular slave one as it
>> currently does.  The ROMDP is already installed by beforeTraversal() (so
>> we'll still be able to switch the web app to read-only without
>> restarting) but as you said we'll need to install that policy on
>> startup, for things like the librarian.
>> 
>> We also need to make sure that all DatabasePolicies can detect a mode
>> change and close the stores used by the previous mode, so that we don't
>> leave open connections behind.
> 
> Hmm... yeah. All the DatabasePolicies would need to know about RO
> mode, which sucks. Instead, we could just do this in the
> IStoreSelector - if read-only mode is detected, ignore any installed
> DatabasePolicy and return the read-only Stores.

Salgado, the thread stopped pretty soon after this suggestion.  Does this sound like a reasonable plan of attack to you?  If so, maybe I could have a quick call with you next week to make sure I understand what Foundations needs to do.

Thank you

Gary


Follow ups

References