← Back to team overview

launchpad-dev team mailing list archive

Re: verifying fix of attempt to write to read-only slave

 

On Fri, 2010-01-15 at 13:02 +0700, Stuart Bishop wrote:
> On Fri, Jan 15, 2010 at 12:00 PM, Edwin Grubbs <edwin.grubbs@xxxxxxxxxxxxx> wrote:
> > I can't figure out how to test bug 506963 on launchpad.dev. This is in
> > part because I can't understand how this error could have possibly
> > happen. The form is submitted as a POST, so the dbpolicy should choose
> > the master main store. Although the EmailAddress is normally retrieved
> > from the auth store, which appears to replicate that table from the
> > main store, the place where this error occurs should be getting the
> > email address from the store provided by Store.of(person).
> >
> > Does anyone know what is going on here?
> 
> You have things backwards. EmailAddress is part of the auth store, and
> available read-only via the main store. Store.of(person) will
> generally give you the main store.
> 
> Best way of fixing this sort of thing is if you need to write to an
> object, cast it to the master version - IMasterObject(emailaddress)
> will be a no-op if you already have the writable object and is future
> proof when tables get shuffled around.
> 
> lib/canonical/launchpad/doc/storm.txt for more details

This is the context of the bug that Edwin is fixing.

   3 InternalError: Slony-I: Table emailaddress is replicated and cannot
be modified on a subscriber node
    Bug: https://launchpad.net/bugs/464161
    POST: 3  Robots: 0  Local: 3
       3 https://launchpad.net/%
7Ekorhelvtak/+deactivate-account (Person:+deactivate-account)
        OOPS-1475C322, OOPS-1475E193, OOPS-1475H234




-- 
__Curtis C. Hovey_________
http://launchpad.net/

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References