[Zope] ODBC and Inserting not committed

Alexander Staubo alex@mop.no
Tue, 27 Jul 1999 06:44:19 +0200


Not to nitpick -- well, all right, it IS to nitpick:  ;)

"Thunking" is usually referred to bridging between interfaces of
different bitness; for example, calling 16-bit code from a 32-bit native
process. Its generic meaning is, historically at least, "a
compiler-generated stub procedure".

As legends go, "thunk" is a deliberate misspelling of "thought" ("the
past tense of `think' at two in the morning"). Afai, it's a formalized
construct in Scheme -- the closest analog in Python I guess would be
code objects. Jargon file says this: 
	http://www.srdc.metu.edu.tr/dengi/computer/jargon/thunk.html

You could extend "thunking" generally to mean any bridge-like service, I
guess (first time I've seen this usage), but isn't that what we use
"wrapper" for? In this case, a serializing or single-access wrapper.

Sorry if I'm being a nuisance. :)

-- 
Alexander Staubo             http://www.mop.no/~alex/
"QED?" said Russell.
"It's Latin," said Morgan. "It means, So there you bastard."
--Robert Rankin, _Nostramadus Ate My Hamster_

>-----Original Message-----
>From: Michel Pelletier [mailto:michel@digicool.com]
>Sent: 27. juli 1999 05:57
>To: Graham Chiu
>Cc: zope@zope.org
>Subject: Re: [Zope] ODBC and Inserting not committed
>
>
>Graham Chiu wrote:
>> 
>> Hi,
>> 
>> With 2b1, win32, I now find that my Zsql inserts don't commit.  They
>> last for as long as the browser is active.  I start another browser
>> session after closing the first one down, and they're gone.
>> 
>
>It's possible, although I have not personally looked at the code, that
>the ODBC adapter has not been updated to work with the new ZODB3
>transaction manager.
>
>Try running Zope in single thread mode ('-t 1' on the z2.py command
>line) and see if the problem persists.  If so, then the ODBC 
>driver will
>probably need to be 'thunked' which is a pretty trivial 10 
>minute change
>to the code.
>
>Note that thunking a DA has side effects!  'Thunking' means to wrap the
>Zope DA transaction manager in a thread lock.  What this means is that
>if a DA is thunked, it will work in a multi-threaded Zope, but all ZSQL
>queries will be serialized at the Zope transaction layer *including
>queries from other thunked DAs!*  This means that all thunked DAs block
>each other at Zope transacion boundaries (Zope transacion 
>boundaries are
>usually but not allways, single requests, like an HTTP request).  This
>does not apply to completly thread safe (or, level 3) DAs.  To sumarize
>the levels:
>
>Level 1: Not threadsafe, concurrent or thunked.  Zope MUST run 
>in single
>thread mode
>
>Level 2: Not concurrent, but threadsafe and thunked.  Zope can run in
>thread mode
>
>Level 3: Threadsafe and concurrent.  Zope can run in thread mode
>
>Going from level 1 to 2 is usualy trivial.  That I know of, Gadfly and
>the soon to be released ZSybaseDA are level 2.  Level 3 is much harder,
>and I believe that DCOracle will probably be the first level 3 DA there
>is.
>
>-Michel
>
>> Updates seem to commit though.
>> 
>> Bizarre.
>> 
>> -------
>> Regards,        Graham Chiu
>> gchiu<at>compkarori.co.nz
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://www.zope.org/mailman/listinfo/zope
>> 
>> (To receive general Zope announcements, see:
>> http://www.zope.org/mailman/listinfo/zope-announce
>> 
>> For developer-specific issues, zope-dev@zope.org -
>> http://www.zope.org/mailman/listinfo/zope-dev )
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(To receive general Zope announcements, see:
>http://www.zope.org/mailman/listinfo/zope-announce
>
>For developer-specific issues, zope-dev@zope.org -
>http://www.zope.org/mailman/listinfo/zope-dev )
>