Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel
Story version corruption
 

Index | Next | Previous | View Flat


rolfm at denison

Jan 21, 2009, 9:15 AM


Views: 9194
Permalink
Story version corruption

Well, we've got the first error message from a story version being
corrupted thanks to our new unique key index on story instance. The
scenerio:

A person checked in a story. The check in failed in some manner, as it
is still on their workflow. If you go to the desk, there is a button
that claims it can be checked out. Attempting to check it out results
in this error in the logs

Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR:
duplicate key violates unique constraint "udx_story__story_instance"\n
[.for Statement "INSERT INTO story_instance (id, name, description,
story__id, version, usr__id, primary_oc__id, slug, cover_date, note,
checked_out)VALUES
(NEXTVAL('seq_story_instance'), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" with
ParamValues: 6='1', 3='7616', 7='Overview', 9=undef, 2='',
8='2007-06-20 19:15:00', 1='Overview', 4='11', 10='1', 5='1029'] at /
usr/local/bricolage/lib/Bric/Util/DBI.pm line 1087, <GEN1620> line 68.\n
[/usr/local/bricolage/lib/Bric/Util/DBI.pm:1088]


Which makes sense. Go to the story instance table, though, and we see
this:

id | name | description | story__id | version | usr__id |
slug | primary_oc__id | cover_date | note | checked_out
...
73198 | Overview | | 7616 | 7 | 1366 |
Overview | 1 | 2007-06-20 19:15:00 | | f
73304 | Overview | | 7616 | 8 | 1366 |
Overview | 1 | 2007-06-20 19:15:00 | | f
90836 | Overview | | 7616 | 9 | 1312 |
Overview | 1 | 2007-06-20 19:15:00 | | f
101200 | Overview | | 7616 | 10 | 1312 |
Overview | 1 | 2007-06-20 19:15:00 | | f
101212 | Overview | | 7616 | 11 | 1312 |
Overview | 1 | 2007-06-20 19:15:00 | | f
101799 | Overview | | 7616 | 11 | 1312 |
Overview | 1 | 2007-06-20 19:15:00 | | t


Now we actually have lots of stories that look like this - 435 to be
exact. Most of the time it means that the latest version is being
worked on, and hasn't been checked in yet. But you've got the
database creating a new record with the same version when a story is
checked out, and then incrementing that on checkin. Maybe that is
part of the problem here, and it would be better to increment the
version number on the initial check out - maybe it would help prevent
this sort of thing. But I'm not sure why the checkin partially works,
but leaves a version on her workspace and doesn't increment the
version number.

What do other people think?

-Matt

Subject User Time
Story version corruption rolfm at denison Jan 21, 2009, 9:15 AM
    Re: Story version corruption david at kineticode Jan 21, 2009, 9:24 AM
    Re: Story version corruption rolfm at denison Jan 21, 2009, 9:52 AM
        Re: Story version corruption phillip at communitybandwidth Jan 21, 2009, 10:47 AM
        Re: Story version corruption david at kineticode Jan 21, 2009, 11:01 AM
    Re: Story version corruption rolfm at denison Jan 21, 2009, 10:50 AM
        Re: Story version corruption phillip at communitybandwidth Jan 21, 2009, 10:58 AM
    Re: Story version corruption lannings at who Jan 22, 2009, 2:11 AM
    Re: Story version corruption rolfm at denison Jan 22, 2009, 5:12 AM
    Re: Story version corruption david at kineticode Jan 22, 2009, 8:20 AM
    Re: Story version corruption lannings at who Jan 23, 2009, 1:29 AM
    Re: Story version corruption david at kineticode Jan 23, 2009, 9:05 AM
    Re: Story version corruption rolfm at denison Feb 3, 2009, 11:47 AM
        Re: Story version corruption david at kineticode Feb 4, 2009, 9:30 AM
    Re: Story version corruption lannings at who Feb 4, 2009, 2:17 AM
    Re: Story version corruption rolfm at denison Feb 4, 2009, 10:09 AM
        Re: Story version corruption david at kineticode Feb 4, 2009, 10:50 AM
    Re: Story version corruption rolfm at denison Feb 4, 2009, 1:42 PM
        Re: Story version corruption lannings at who Feb 5, 2009, 1:10 AM
        Re: Story version corruption david at kineticode Feb 5, 2009, 10:18 AM
    Re: Story version corruption david at kineticode Feb 16, 2009, 4:41 PM
    Re: Story version corruption david at kineticode Feb 16, 2009, 8:24 PM
    Re: Story version corruption rolfm at denison Feb 17, 2009, 9:47 AM
    Re: Story version corruption david at kineticode Feb 17, 2009, 11:04 AM
    Re: Story version corruption rolfm at denison Mar 5, 2009, 8:36 AM
        Re: Story version corruption david at kineticode Mar 5, 2009, 8:59 AM
    Re: Story version corruption rolfm at denison Mar 5, 2009, 5:13 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.