Re: [Zope-dev] APE leaving SQL transactions open

2004-08-26 Thread Paolo Bizzarri
Hi Shane,

we have a PostgreSQL DA object in place, but we are not using it in our tests.  

Hope this helps.

Best regards.

Paolo

> One thing I wonder, though, is whether you're simultaneously connecting to
> Postgres using a Zope database adapter.  It shouldn't matter, but who
> knows, maybe it does.
>
> Shane

-- 
Paolo Bizzarri - President - Icube S.r.l.
Address:Via Ridolfi 15 - 56124 Pisa (PI), Italy
E-mail: [EMAIL PROTECTED]   Web:http://www.icube.it
Phone:  (+39) 050 97 02 07  Fax:(+39) 050 31 36 588
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] APE leaving SQL transactions open

2004-08-24 Thread Shane Hathaway
On Friday 13 August 2004 01:43 am, Paolo Bizzarri wrote:
> Now, let's  add an object (a File).
>
> 1) I can see a transaction *NOT* beginning, going on the sql log, with a
> COMMIT;
> 2) I can see a begin/finish in my log;
>
> The environment is as follows:
> 1) postgresql 7.3.2
> 2) zope 2.7.1
> 3) psycopg 1.1.15
>
> Any help would be appreciated.

I've been pondering this for a while.  Just today I learned that I've slightly 
misinterpreted ZODB's tpc_* transaction API, and perhaps Ape is using the API 
incorrectly.  Specifically, a transaction can potentially call a 
participant's abort() method without ever calling tpc_abort().  I'm thinking 
about the implications.

One thing I wonder, though, is whether you're simultaneously connecting to 
Postgres using a Zope database adapter.  It shouldn't matter, but who knows, 
maybe it does.

Shane
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] APE leaving SQL transactions open

2004-08-13 Thread Paolo Bizzarri
On Friday 13 August 2004 06:14, Shane Hathaway wrote:
> On Thursday 12 August 2004 04:51 am, Paolo Bizzarri wrote:
> > A problem we encountered is that APE leaves the final db transaction
> > neither commited nor aborted, in the normal behaviour.
>
> This shouldn't happen, of course, and I haven't seen any behavior like
> this. What database are you using?

The database is postgres 7.3.2, the adapter is psycopg 1.1.15

> Ape tries very hard to either commit or roll back every transaction.  It
> integrates with the ZODB transaction machinery, and the ZODB transaction
> machinery is reliable.  The relevant code is near the bottom of
> lib/apelib/sql/dbapi.py, in the abort() and finish() methods.
>
> Shane

I've tried to add a couple of prints in the begin, abort and finish methods.

What I see is quite interesting.

I've started with the default /sql mount point. I click on the mount point 
and:

1) I can see a transaction going on the sql log, but no ABORT or COMMIT;
2) ps axf | grep idle revelase and "idle in transaction"
3) there is *NO* begin/abort or begin/finish in the standard output

Now, let's  add an object (a File).

1) I can see a transaction *NOT* beginning, going on the sql log, with a 
COMMIT;
2) I can see a begin/finish in my log;

The environment is as follows:
1) postgresql 7.3.2
2) zope 2.7.1
3) psycopg 1.1.15

Any help would be appreciated.

Regards
Paolo

-- 
Paolo Bizzarri - President - Icube S.r.l.
Address:Via Ridolfi 15 - 56124 Pisa (PI), Italy
E-mail: [EMAIL PROTECTED]   Web:http://www.icube.it
Phone:  (+39) 050 97 02 07  Fax:(+39) 050 31 36 588
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] APE leaving SQL transactions open

2004-08-13 Thread Shane Hathaway
On Thursday 12 August 2004 04:51 am, Paolo Bizzarri wrote:
> A problem we encountered is that APE leaves the final db transaction
> neither commited nor aborted, in the normal behaviour.

This shouldn't happen, of course, and I haven't seen any behavior like this.  
What database are you using?

Ape tries very hard to either commit or roll back every transaction.  It 
integrates with the ZODB transaction machinery, and the ZODB transaction 
machinery is reliable.  The relevant code is near the bottom of 
lib/apelib/sql/dbapi.py, in the abort() and finish() methods.

Shane
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] APE leaving SQL transactions open

2004-08-12 Thread Paolo Bizzarri
Hi all.

We're making our first experiments with APE. The environment is Zope 2.7.1 on 
Linux. We're using APE 0.8.1.

A problem we encountered is that APE leaves the final db transaction neither 
commited nor aborted, in the normal behaviour.

I mean, this is what is going on here:

1) I create a new object under the /sql folder
2) all the required SQL transaction is done, and data is commited on the DB
3) a new SQL transaction begins (corresponding to the new zope transaction) 
for the new page

but this last SQL transaction is never closed.

The short story is that you can see the (in)famous "idle in transaction" 
message on a ps axf on the box

Since we had very bad experience with the "idle in transaction" in the past, 
we would like to know if this is a known behaviour, if it is safe, and why.

Thank you all.

Regards
Paolo

-- 
Paolo Bizzarri - President - Icube S.r.l.
Address:Via Ridolfi 15 - 56124 Pisa (PI), Italy
E-mail: [EMAIL PROTECTED]   Web:http://www.icube.it
Phone:  (+39) 050 97 02 07  Fax:(+39) 050 31 36 588
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )