Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Cursor iterating only keys?



"Michael Hollins" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> While I can see that the approach you guys are recommending would improve
> performance I think it should come with a warning for newbies to transaction
> processing. i.e:
> 
> WARNING: this approach weakens the isolation guarantees provided by Berkeley
> DB's fully serializable transaction mechanism. e.g. If another
> thread/process adds records after your thread has retrieved its in-memory
> list, then you may find that your in-memory list is out of date and your
> transaction may miss modifying some relevant records.
> 
> As such my advice would be to only use the approach in situations where you
> have performance benchmark results that prove that the transaction in
> question is a bottleneck and further in which you can convince yourself that
> the suggested approach will still produce correct results.

You're correct, I should have qualified this myself.  Thank you
for the follow-up.

One other thing that may be useful; there's an isolation level
that is found in other database products that Berkeley DB does
not currently provide: releasing read locks behind the cursor
as it moves through the database, but holding write locks as
usual, until the transaction commits or aborts.  It's intended
to solve exactly this problem, and we expect to add it in our
next release of Berkeley DB.

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic                          [EMAIL PROTECTED]
Sleepycat Software Inc.         keithbosticim (ymsgid)
118 Tower Rd.                     +1-781-259-3139
Lincoln, MA 01773               http://www.sleepycat.com



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.