FW: Zope & optimistic transactions.
-----Original Message----- From: Clark OBrien Sent: Monday, November 05, 2001 7:14 AM To: 'chrism@zope.com'; 'k_vertigo@yahoo.com' Cc: 'zope@zope.org' Subject: Zope & optimistic transactions.
Chris, I set up a test harness to exercise zopes optimistic transaction management. My test immediatly caused a ZODB exception.
I am running zope 2.42. on win 2k, the scripts are attached. Results below:
As you recall I posed the following question:
What if you had a directory structure like: Folder1 Folder-2 Folder-3 ... .. Folder-n Each folder had an attribute foo and there were two scripts, script1 and script2. script1 modified foo on one Folder only while script2 traversed all the folders modifying the attribute foo on each one of them. Would the script2 ever commit while the fist while script1 was continuously called. This is interesting because a call to script2 would never finish before several calls to script1 finished.
I set up a simple test with only 10 folders. I then wrote the script below changeLevel2 that is my scri1 above and changeFolders that is my script2 above. I ran changeLevel2 in a loop using the following code: ----------------------------------------script---------------------------- ------------------- import urllib params = urllib.urlencode({'theText': 'Vitamin D'}) while 1: f = urllib.urlopen("http://localhost:8080/Test/changeLevel2?%s" % params) print f.read() -----------------------------------------script--------------------------- ---------------------
I then ran the script changeFolders from my browsers. The result was the following error message:
------------------------------------------------------------ ZODB.POSException.ConflictError
Sorry, a site error occurred.
Traceback (innermost last): File C:\zope\lib\python\ZPublisher\Publish.py, line 223, in publish_module File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 195, in publish ----------------------------------------------------------
<<scripts.txt>>
There won't be any more discussion about this issue from me. - C ----- Original Message ----- From: "Clark OBrien" <COBrien@isis-server.vuse.vanderbilt.edu> To: <zope-dev@zope.org> Sent: Friday, November 30, 2001 12:48 PM Subject: [Zope-dev] FW: Zope & optimistic transactions.
-----Original Message----- From: Clark OBrien Sent: Monday, November 05, 2001 7:14 AM To: 'chrism@zope.com'; 'k_vertigo@yahoo.com' Cc: 'zope@zope.org' Subject: Zope & optimistic transactions.
Chris, I set up a test harness to exercise zopes optimistic transaction management. My test immediatly caused a ZODB exception.
I am running zope 2.42. on win 2k, the scripts are attached. Results below:
As you recall I posed the following question:
What if you had a directory structure like: Folder1 Folder-2 Folder-3 ... .. Folder-n Each folder had an attribute foo and there were two scripts,
script1 and
script2. script1 modified foo on one Folder only while script2 traversed all the folders modifying the attribute foo on each one of them. Would the script2 ever commit while the fist while script1 was continuously called. This is interesting because a call to script2 would never finish before several calls to script1 finished.
I set up a simple test with only 10 folders. I then wrote the script below changeLevel2 that is my scri1 above and changeFolders that is my script2 above. I ran changeLevel2 in a loop using the following code:
----------------------------------------script----------------------
------------------- import urllib params = urllib.urlencode({'theText': 'Vitamin D'}) while 1: f = urllib.urlopen("http://localhost:8080/Test/changeLevel2?%s" % params) print f.read()
-----------------------------------------script---------------------
---------------------
I then ran the script changeFolders from my browsers. The result was the following error message:
------------------------------------------------------------ ZODB.POSException.ConflictError
Sorry, a site error occurred.
Traceback (innermost last): File C:\zope\lib\python\ZPublisher\Publish.py, line 223, in publish_module File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 200, in publish File C:\zope\lib\python\ZPublisher\Publish.py, line 195, in publish ----------------------------------------------------------
<<scripts.txt>>
That was not the point dude. Your cowardly call for a response from the intellectual prostitutes on this list leaves me uninterested in anything you may have to say. Over and Out Clark --- Chris McDonough <chrism@zope.com> wrote:
There won't be any more discussion about this issue from me.
- C
----- Original Message ----- From: "Clark OBrien" <COBrien@isis-server.vuse.vanderbilt.edu> To: <zope-dev@zope.org> Sent: Friday, November 30, 2001 12:48 PM Subject: [Zope-dev] FW: Zope & optimistic transactions.
-----Original Message----- From: Clark OBrien Sent: Monday, November 05, 2001 7:14 AM To: 'chrism@zope.com'; 'k_vertigo@yahoo.com' Cc: 'zope@zope.org' Subject: Zope & optimistic transactions.
Chris, I set up a test harness to exercise zopes
optimistic transaction
management. My test immediatly caused a ZODB exception.
I am running zope 2.42. on win 2k, the scripts are attached. Results below:
As you recall I posed the following question:
What if you had a directory structure like: Folder1 Folder-2 Folder-3 ... .. Folder-n Each folder had an attribute foo and there were two scripts, script1 and script2. script1 modified foo on one Folder only while script2 traversed all the folders modifying the attribute foo on each one of them. Would the script2 ever commit while the fist while script1 was continuously called. This is interesting because a call to script2 would never finish before several calls to script1 finished.
I set up a simple test with only 10 folders. I then wrote the script below changeLevel2 that is my scri1 above and changeFolders that is my script2 above. I ran changeLevel2 in a loop using the following code:
----------------------------------------script----------------------
------
------------------- import urllib params = urllib.urlencode({'theText': 'Vitamin D'}) while 1: f =
urllib.urlopen("http://localhost:8080/Test/changeLevel2?%s"
% params)
print f.read()
-----------------------------------------script---------------------
------
---------------------
I then ran the script changeFolders from my browsers. The result was the following error message:
------------------------------------------------------------
ZODB.POSException.ConflictError
Sorry, a site error occurred.
Traceback (innermost last): File C:zopelibpythonZPublisherPublish.py, line 223, in publish_module File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 195, in publish
----------------------------------------------------------
<<scripts.txt>>
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
__________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1
Clark O'Brien wrote:
That was not the point dude. Your cowardly call for a response from the intellectual prostitutes on this list leaves me uninterested in anything you may have to say.
Excuse me, what the FUCK is your problem 'dude'? You obviously have no fucking clue. Kindly piss off and grow up. That's about the sum total of anything useful I can say in response to your postings so far... Chris
He he, Another classic Withers-style measured response ;-) Easy on those flames, dude...Everyone move along now, there's nothing to see here... seb * Chris Withers <chrisw@nipltd.com> [011130 18:19]:
Clark O'Brien wrote:
That was not the point dude. Your cowardly call for a response from the intellectual prostitutes on this list leaves me uninterested in anything you may have to say.
Excuse me, what the FUCK is your problem 'dude'?
You obviously have no fucking clue. Kindly piss off and grow up.
That's about the sum total of anything useful I can say in response to your postings so far...
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- [] j a m k i t seb bacon T: 020 7749 7218 F: 020 7739 8683 M: 07968 301 336 W: www.jamkit.com
mail | grep "dude" > /dev/null /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
Dude, it's not a bug. You're *meant* to get a ConflictError exception when writes conflict. That signals the publisher to retry. Search on zope.org for "conflict resolution". Regards, seb * Clark O'Brien <clark_obrien@yahoo.com> [011130 18:05]:
That was not the point dude. Your cowardly call for a response from the intellectual prostitutes on this list leaves me uninterested in anything you may have to say. Over and Out Clark
--- Chris McDonough <chrism@zope.com> wrote:
There won't be any more discussion about this issue from me.
- C
----- Original Message ----- From: "Clark OBrien" <COBrien@isis-server.vuse.vanderbilt.edu> To: <zope-dev@zope.org> Sent: Friday, November 30, 2001 12:48 PM Subject: [Zope-dev] FW: Zope & optimistic transactions.
-----Original Message----- From: Clark OBrien Sent: Monday, November 05, 2001 7:14 AM To: 'chrism@zope.com'; 'k_vertigo@yahoo.com' Cc: 'zope@zope.org' Subject: Zope & optimistic transactions.
Chris, I set up a test harness to exercise zopes
optimistic transaction
management. My test immediatly caused a ZODB exception.
I am running zope 2.42. on win 2k, the scripts are attached. Results below:
As you recall I posed the following question:
What if you had a directory structure like: Folder1 Folder-2 Folder-3 ... .. Folder-n Each folder had an attribute foo and there were two scripts, script1 and script2. script1 modified foo on one Folder only while script2 traversed all the folders modifying the attribute foo on each one of them. Would the script2 ever commit while the fist while script1 was continuously called. This is interesting because a call to script2 would never finish before several calls to script1 finished.
I set up a simple test with only 10 folders. I then wrote the script below changeLevel2 that is my scri1 above and changeFolders that is my script2 above. I ran changeLevel2 in a loop using the following code:
----------------------------------------script----------------------
------
------------------- import urllib params = urllib.urlencode({'theText': 'Vitamin D'}) while 1: f =
urllib.urlopen("http://localhost:8080/Test/changeLevel2?%s"
% params)
print f.read()
-----------------------------------------script---------------------
------
---------------------
I then ran the script changeFolders from my browsers. The result was the following error message:
------------------------------------------------------------
ZODB.POSException.ConflictError
Sorry, a site error occurred.
Traceback (innermost last): File C:zopelibpythonZPublisherPublish.py, line 223, in publish_module File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 195, in publish
----------------------------------------------------------
<<scripts.txt>>
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
__________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- [] j a m k i t seb bacon T: 020 7749 7218 F: 020 7739 8683 M: 07968 301 336 W: www.jamkit.com
Dude, But what happens when it cannot resolve the conflict within three tries. In most cases it quietly gives up in the more fortunate cases the exception output appears in the browser screen. In the example I showed there are no "Hot Spots" and the transaction will never commit. This problem will go unnoticed in most applications but if you are developing an application with a high number of transactions per second and you see some strange behavior better check this out. I don't actually see this as a design flaw. I had no problem changing the design to avoid this problem-once I know what the problem was. I don't see the fact that Zope gives up on a transaction after three tries is an obscure detail. --- seb bacon <seb@jamkit.com> wrote:
Dude, it's not a bug. You're *meant* to get a ConflictError exception when writes conflict. That signals the publisher to retry.
Search on zope.org for "conflict resolution".
Regards,
seb
* Clark O'Brien <clark_obrien@yahoo.com> [011130 18:05]:
That was not the point dude. Your cowardly call for a response from the intellectual prostitutes on this list leaves me uninterested in anything you may have to say. Over and Out Clark
--- Chris McDonough <chrism@zope.com> wrote:
There won't be any more discussion about this issue from me.
- C
----- Original Message ----- From: "Clark OBrien" <COBrien@isis-server.vuse.vanderbilt.edu> To: <zope-dev@zope.org> Sent: Friday, November 30, 2001 12:48 PM Subject: [Zope-dev] FW: Zope & optimistic transactions.
-----Original Message----- From: Clark OBrien Sent: Monday, November 05, 2001 7:14 AM To: 'chrism@zope.com'; 'k_vertigo@yahoo.com' Cc: 'zope@zope.org' Subject: Zope & optimistic transactions.
Chris, I set up a test harness to exercise zopes
optimistic transaction
management. My test immediatly caused a ZODB exception.
I am running zope 2.42. on win 2k, the scripts are attached. Results below:
As you recall I posed the following question:
What if you had a directory structure like: Folder1 Folder-2 Folder-3 ... .. Folder-n Each folder had an attribute foo and there were two scripts, script1 and script2. script1 modified foo on one Folder only while script2 traversed all the folders modifying the attribute foo on each one of them. Would the script2 ever commit while the fist while script1 was continuously called. This is interesting because a call to script2 would never finish before several calls to script1 finished.
I set up a simple test with only 10 folders. I then wrote the script below changeLevel2 that is my scri1 above and changeFolders that is my script2 above. I ran changeLevel2 in a loop using the following code:
----------------------------------------script----------------------
------
------------------- import urllib params = urllib.urlencode({'theText': 'Vitamin D'}) while 1: f =
urllib.urlopen("http://localhost:8080/Test/changeLevel2?%s"
% params)
print f.read()
-----------------------------------------script---------------------
------
---------------------
I then ran the script changeFolders from my browsers. The result was the following error message:
------------------------------------------------------------
ZODB.POSException.ConflictError
Sorry, a site error occurred.
Traceback (innermost last): File C:zopelibpythonZPublisherPublish.py, line 223, in publish_module File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 200, in publish File C:zopelibpythonZPublisherPublish.py, line 195, in publish
----------------------------------------------------------
<<scripts.txt>>
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
__________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
--
=== message truncated === __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1
Below is the one response to your message, by someone from ZC. I find it hard to locate the parts about "censored in a way that would not be allowed for most commercial products", "the discussion was quickly moved line", and "these issues are kept strictly confidential". """ Please read one or more of the following: http://www.amk.ca/zodb/zodb-zeo.html http://www.zope.org/Members/jim/ZODB/ApplicationLevelConflictResolution http://www.mit.edu/afs/sipb/project/python/doc/DevGuide/Persistence.html They describe the ZODB and its optimistic concurrency strategy in detail, and should answer any questions you may have about the purpose and handling of ConflictErrors. They also contain (or link to) other information that you really should know before attempting to analyze the ZODB in any depth. """ --Paul
participants (7)
-
Casey Duncan -
Chris McDonough -
Chris Withers -
Clark O'Brien -
Clark OBrien -
Paul Everitt -
seb bacon