From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/programmer_reference/lock_notxn.html | 65 +++++++++++++++++-------------- 1 file changed, 36 insertions(+), 29 deletions(-) (limited to 'docs/programmer_reference/lock_notxn.html') diff --git a/docs/programmer_reference/lock_notxn.html b/docs/programmer_reference/lock_notxn.html index 0455d4a1..8d1f7959 100644 --- a/docs/programmer_reference/lock_notxn.html +++ b/docs/programmer_reference/lock_notxn.html @@ -14,7 +14,7 @@ -

If an application runs with locking specified, but not transactions (for -example, DB_ENV->open() is callsed with DB_INIT_LOCK or -DB_INIT_CDB specified, but not DB_INIT_TXN), locks are -normally acquired during each Berkeley DB operation and released before the -operation returns to the caller. The only exception is in the case of -cursor operations. Cursors identify a particular position in a file. -For this reason, cursors must retain read locks across cursor calls to -make sure that the position is uniquely identifiable during a subsequent -cursor call, and so that an operation using DB_CURRENT will -always refer to the same record as a previous cursor call. These cursor -locks cannot be released until the cursor is either repositioned and a -new cursor lock established (for example, using the DB_NEXT -or DB_SET flags), or the cursor is closed. As a result, -application writers are encouraged to close cursors as soon as -possible.

-

It is important to realize that concurrent applications that use locking -must ensure that two concurrent threads do not block each other. -However, because Btree and Hash access method page splits can occur at -any time, there is virtually no way to guarantee that an application -that writes the database cannot deadlock. Applications running without -the protection of transactions may deadlock, and can leave the database -in an inconsistent state when they do so. Applications that need -concurrent access, but not transactions, are more safely implemented -using the Berkeley DB Concurrent Data Store Product.

+

+ If an application runs with locking specified, but not + transactions (for example, DB_ENV->open() is callsed with + DB_INIT_LOCK or DB_INIT_CDB specified, but not + DB_INIT_TXN), locks are normally acquired during each + Berkeley DB operation and released before the operation + returns to the caller. The only exception is in the case of + cursor operations. Cursors identify a particular position in a + file. For this reason, cursors must retain read locks across + cursor calls to make sure that the position is uniquely + identifiable during a subsequent cursor call, and so that an + operation using DB_CURRENT will always refer to the same + record as a previous cursor call. These cursor locks cannot be + released until the cursor is either repositioned and a new + cursor lock established (for example, using the DB_NEXT or + DB_SET flags), or the cursor is closed. As a result, + application writers are encouraged to close cursors as soon as + possible. +

+

+ It is important to realize that concurrent applications that + use locking must ensure that two concurrent threads do not + block each other. However, because Btree and Hash access + method page splits can occur at any time, there is virtually + no way to guarantee that an application that writes the + database cannot deadlock. Applications running without the + protection of transactions may deadlock, and can leave the + database in an inconsistent state when they do so. + Applications that need concurrent access, but not + transactions, are more safely implemented using the Berkeley + DB Concurrent Data Store Product. +

-- cgit v1.2.1