|
![]() ![]()
|
In the absence of locking, no guarantees are made about the stability of cursors in different threads of control. However, the Btree, Queue and Recno access methods guarantee that cursor operations, interspersed with any other operation in the same thread of control will always return keys in order and will return each non-deleted key/data pair exactly once. Because the Hash access method uses a dynamic hashing algorithm, it cannot guarantee any form of stability in the presence of inserts and deletes unless transactional locking is performed.
(락이 없을때 여러쓰레드에 의해 컨트롤되는 커서는 안정성을 보장되지 않는다.그러나 Btree, Queue and Recno 엑세스 메소드는 커서 동작을 보장하고 동일한 쓰레드에 의해 콘트롤되는 여러 오페레이션에 대해 항상 규칙적인 키를 리턴하고 삭제되지 않는 키/데이타 쌍을 리턴한다.해쉬 엑세스는 동적인 해싱알고리즘을 사용하기 때문에 이것은 트랜젝션 락이 없으면 삽인 삭제가 있을시 어떠한 커서 안정성를 보장하지 않는다.)
If locking was specified when the Berkeley DB environment was opened, but transactions are not in effect, the access methods provide repeatable reads with respect to the cursor. That is, a DB_CURRENT call on the cursor is guaranteed to return the same record as was returned on the last call to the cursor.
(만약 버클리 디비 환경이 오픈될때 락이 설정되었다고 트랜젝션이 걸리지 않았다면 액세스 메소드는 커서에 대해 연속적인 읽기를 제공한다.즉 커서에 대한 DB_CURRENT 호출은 커서에 대해 마지막으로 호출된 레코드에 대해 같은 레코드를 리턴한다.)
In the presence of transactions, the Btree, Hash and Recno access methods provide degree 3 isolation (serializable transactions). The Queue access method provides degree 3 isolation with the exception that it permits phantom records to appear between calls. That is, deleted records are not locked, therefore another transaction may replace a deleted record between two calls to retrieve it. The record would not appear in the first call but would be seen by the second call. For readers not enclosed in transactions, all access method calls provide degree 2 isolation, that is, reads are not repeatable. Finally, Berkeley DB provides degree 1 isolation when the DB_DIRTY_READ flag is specified; that is, reads may see data modified in transactions which have not yet committed.
(트랜젝션이 걸리면 Btree, Hash and Recno 액세스 메소드는 3단계고립(=시리얼라이저블 트랜젝션)을 제공한다.Queue 는 3단계고립을 제공하지만 예외적으로 팬텀레코드가 call사이에 나타날수 있도록 허용한다.즉 삭제된 레코드는 락되지 않는다.따라서 다른 트랜젝션은 리트리빙 콜사이에서 삭제된 레코드를 대체한다.)
For all access methods, a cursor scan of the database performed within the context of a transaction is guaranteed to return each key/data pair once and only once, except in the following case. If, while performing a cursor scan using the Hash access method, the transaction performing the scan inserts a new pair into the database, it is possible that duplicate key/data pairs will be returned.
(모든 액세스 메소드에 대해 트랜젝션에서의 커서스캔은 키/데이타를 한번 리턴시키는것을 보장한다.그러나 다음은 예외적이다.만약 Hash엑세스 메소드에 대해 커서스캔중에 있을때 스캔을 실행하고 있는 트랜젝션이 새로운 키/데이타를 삽입하면 복제된 키/데이타 값이 리턴될 수 있다.)
![]() ![]()
|
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.