Librarian should confirm it is being used from the correct database

Bug #30221 reported by Stuart Bishop
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Andrew Bennetts

Bug Description

Librarian clients need to inform the Librarian server of the database name they are connected too.

The Librarian Server needs to assert that this matches the database that it is connected to.

This will help us diagnose the rather worrying duplicate file issues that we are seeing on staging.

The database name can be determined by issuing the SQL:

    SELECT current_database()

Revision history for this message
Stuart Bishop (stub) wrote :

Kiko has requested that this land.

spiv - ping me if you can't look at this on Thursday

Changed in launchpad:
assignee: nobody → spiv
status: Unconfirmed → Confirmed
Revision history for this message
Stuart Bishop (stub) wrote :

We might also want to change the error when a file is found to already on disk into a warning (although that is just relieving the symptoms rather than the cause)

Revision history for this message
Andrew Bennetts (spiv) wrote :

I have a branch that implements this at: sftp://chinstrap/home/warthogs/archives/spiv/launchpad/librarian-database-agreement

It's in the review queue.

Revision history for this message
Andrew Bennetts (spiv) wrote :

Code written; waiting for code review.

Changed in launchpad:
status: Confirmed → In Progress
Revision history for this message
Andrew Bennetts (spiv) wrote :

Regarding the duplicate ID error into a warning, it makes me nervous. In the current situation it appears to be victimising the wrong client, but could just as easily be the other way around.

Perhaps if the client provides the new Database-Name header that explicitly shows that the client and server are using the same DB, then it could downgrade to a warning, but that's a fair bit of complexity for probably not much gain -- and still leaves me nervous :)

Andrew Bennetts (spiv)
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Christian Reis (kiko) wrote :

Is this not fix-released?

Dafydd Harries (daf)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.