Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-24 Thread Guilherme Salgado
On Fri, 2010-05-21 at 16:49 -0400, Gary Poster wrote: On May 8, 2010, at 8:34 AM, Stuart Bishop wrote: On Fri, May 7, 2010 at 8:28 PM, Guilherme Salgado salg...@canonical.com wrote: The latter should work as long as the ROMDP returns the romode store (pointing to the standalone DB)

Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-21 Thread Gary Poster
On May 8, 2010, at 8:34 AM, Stuart Bishop wrote: On Fri, May 7, 2010 at 8:28 PM, Guilherme Salgado salg...@canonical.com 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.

Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-11 Thread Jeroen Vermeulen
On 05/08/2010 07:34 PM, Stuart Bishop wrote: 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. Would it

Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-11 Thread Guilherme Salgado
On Tue, 2010-05-11 at 13:36 +0700, Jeroen Vermeulen wrote: On 05/08/2010 07:34 PM, Stuart Bishop wrote: 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

Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-07 Thread Guilherme Salgado
On Fri, 2010-05-07 at 17:46 +0700, Stuart Bishop wrote: On Fri, May 7, 2010 at 12:56 AM, Guilherme Salgado salg...@canonical.com wrote: We could do what you suggest, but that'd require teaching the librarian about read-only stores as well, as I think we're using the read-only.txt file to

[Launchpad-dev] Connections left open after switching to read only mode

2010-05-06 Thread Guilherme Salgado
Before any roll out that involves changes to the database schema, we switch Launchpad into read only mode and point it to a read-only replica of our DB while we do the roll out. Switching to read only should be just a matter of placing a file named read-only.txt under the root of our tree and

Re: [Launchpad-dev] Connections left open after switching to read only mode

2010-05-06 Thread Guilherme Salgado
On Thu, 2010-05-06 at 23:23 +0700, Stuart Bishop wrote: On Thu, May 6, 2010 at 9:41 PM, Guilherme Salgado salg...@canonical.com wrote: My changes for the read-only switch, though, introduced a way of changing config values at runtime, thus exposing the problem. Is there any particular