I can actually read a fair degree from these dumps, i need mostly to  
know what the actual dependencies are (i.e. which classes are  
dependent on what, whats the error).  also when you do the full debug  
echoing the UOW should illustrate a series of "dependency tuples"  
which will show what pairs of classes the UOW perceives as  
"dependent" on each other.

On Mar 16, 2007, at 6:59 AM, King Simon-NFHD78 wrote:

>
> Hi,
>
> I'm having a problem where the results of session.flush() vary from  
> one
> run to another of my test suite. The unit of work transaction dump is
> significantly different from one run to the next, similar to the issue
> in ticket 461. I haven't managed to make a test case small enough to
> post to the list yet, and I think I need to delve a little further  
> into
> the code to find out why it's failing.
>
> (This is with both 0.3.5 and rev2416)
>
> The logs from the UOWTransaction on a failing run and a passing run  
> are
> below. As well as the ordering being different, there is at least one
> class (ReleaseLine) that doesn't appear in the bad run.
>
> Unfortunately I don't know how to go about debugging this. I think I
> need to see exactly what is going on in the dependency sort. Do you  
> have
> any suggestions for suitable places to add some extra logging?
>
> This is a failing run:
> INFO:sqlalchemy.orm.unitofwork.UOWTransaction.0x..30:Task dump:
>
>  UOWTask(0x184b2b0, Component/component/None) (save/update phase)
>    |
>    |- UOWTask(0x184bb50, User/user/None) (save/update phase)
>    |   |- Save User(0x1851870)
>    |   |   |- Process User(0x1851870).branches
>    |   |   |- Process User(0x1851870).reviews
>    |   |   |- Process User(0x1851870).labels
>    |   |   |- Process Branch(0x17ee310).user
>    |   |   |- Process Branch(0x184b190).user
>    |   |
>    |   |- UOWTask(0x184bb70, ChangeOrigin/change_origin/None)
> (save/update phase)
>    |   |   |   |- Process Branch(0x17ee310).change_origin
>    |   |   |   |- Process Branch(0x184b190).change_origin
>    |   |   |
>    |   |   |- UOWTask(0x184b590, Label/label/None) (save/update phase)
>    |   |   |   |
>    |   |   |   |- UOWTask(0x184b1b0, Branch/branch/None) (save/update
> phase)
>    |   |   |   |   |- Save Branch(0x17ee310)
>    |   |   |   |   |- Save Branch(0x184b190)
>    |   |   |   |   |   |- Process Branch(0x17ee310).review
>    |   |   |   |   |   |- Process Branch(0x184b190).review
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x183f470, Review/review/None)
> (save/update phase)
>
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x184bb30,
> <sqlalchemy.orm.dependency.MapperStub object at 0x0183FDF0>)
> (save/update phase)
>    |   |   |   |   |   |   |- Process Branch(0x17ee310).label
>    |   |   |   |   |   |   |- Process Branch(0x184b190).label
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |
>    |   |   |   |- UOWTask(0x184bfb0, Counter/counter/None) (save/ 
> update
> phase)
>    |   |   |   |   |- Save Counter(0x184b0f0)
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |----
>    |   |   |
>    |   |   |----
>    |   |
>    |   |----
>    |
>    |
>    |- UOWTask(0x184bb50, User/user/None) (delete phase)
>    |   |
>    |   |- UOWTask(0x184bb70, ChangeOrigin/change_origin/None) (delete
> phase)
>    |   |   |
>    |   |   |- UOWTask(0x184b590, Label/label/None) (delete phase)
>    |   |   |   |
>    |   |   |   |- UOWTask(0x184b1b0, Branch/branch/None) (delete  
> phase)
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x183f470, Review/review/None) (delete
> phase)
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x184bb30,
> <sqlalchemy.orm.dependency.MapperStub object at 0x0183FDF0>) (delete
> phase)
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |
>    |   |   |   |- UOWTask(0x184bfb0, Counter/counter/None) (delete
> phase)
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |----
>    |   |   |
>    |   |   |----
>    |   |
>    |   |----
>    |
>    |----
>
> And on a good run looks like this:
>
> INFO:sqlalchemy.orm.unitofwork.UOWTransaction.0x..f0:Task dump:
>
>  UOWTask(0x17f2610, User/user/None) (save/update phase)
>    |- Save User(0x17fe9f0)
>    |   |- Process User(0x17fe9f0).labels
>    |   |- Process Branch(0x17caa10).user
>    |   |- Process Branch(0x17f2470).user
>    |   |- Process User(0x17fe9f0).reviews
>    |   |- Process User(0x17fe9f0).branches
>    |
>    |- UOWTask(0x17f2a50, ChangeOrigin/change_origin/None) (save/update
> phase)
>    |   |   |- Process Branch(0x17caa10).change_origin
>    |   |   |- Process Branch(0x17f2470).change_origin
>    |   |
>    |   |- UOWTask(0x17f29f0, Component/component/None) (save/update
> phase)
>    |   |   |
>    |   |   |- UOWTask(0x17f2ad0, ReleaseLine/release_line/None)
> (save/update phase)
>    |   |   |   |   |- Process Branch(0x17caa10).release_line
>    |   |   |   |   |- Process Branch(0x17f2470).release_line
>    |   |   |   |   |- Process Counter(0x17fed10).release_line
>    |   |   |   |
>    |   |   |   |- UOWTask(0x17f2430, Counter/counter/None) (save/ 
> update
> phase)
>    |   |   |   |   |- Save Counter(0x17fed10)
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |
>    |   |   |   |- UOWTask(0x17f2450, Branch/branch/None) (save/update
> phase)
>    |   |   |   |   |- Save Branch(0x17caa10)
>    |   |   |   |   |- Save Branch(0x17f2470)
>    |   |   |   |   |   |- Process Branch(0x17caa10).review
>    |   |   |   |   |   |- Process Branch(0x17f2470).review
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x17faf70, Review/review/None)
> (save/update phase)
>
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x17f2810,
> <sqlalchemy.orm.dependency.MapperStub object at 0x017DF590>)
> (save/update phase)
>    |   |   |   |   |   |   |- Process Branch(0x17caa10).label
>    |   |   |   |   |   |   |- Process Branch(0x17f2470).label
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |----
>    |   |   |
>    |   |   |----
>    |   |
>    |   |----
>    |
>    |
>    |- UOWTask(0x17f2a50, ChangeOrigin/change_origin/None) (delete  
> phase)
>    |   |
>    |   |- UOWTask(0x17f29f0, Component/component/None) (delete phase)
>    |   |   |
>    |   |   |- UOWTask(0x17f2ad0, ReleaseLine/release_line/None)  
> (delete
> phase)
>    |   |   |   |
>    |   |   |   |- UOWTask(0x17f2430, Counter/counter/None) (delete
> phase)
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |
>    |   |   |   |- UOWTask(0x17f2450, Branch/branch/None) (delete  
> phase)
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x17faf70, Review/review/None) (delete
> phase)
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |
>    |   |   |   |   |- UOWTask(0x17f2810,
> <sqlalchemy.orm.dependency.MapperStub object at 0x017DF590>) (delete
> phase)
>    |   |   |   |   |   |----
>    |   |   |   |   |
>    |   |   |   |   |----
>    |   |   |   |
>    |   |   |   |----
>    |   |   |
>    |   |   |----
>    |   |
>    |   |----
>    |
>    |----
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to