Berkeley DB Reference Guide:
Locking Subsystem

PrevRefNext

Configuring locking

The DB_ENV->set_lk_detect method specifies that the deadlock detector should be run whenever a lock is about to block. This option provides for rapid detection of deadlocks at the expense of potentially frequent invocations of the deadlock detector. On a fast processor with a highly contentious application where response time is critical, this is a good choice. An option argument to the DB_ENV->set_lk_detect method indicates which lock requests should be rejected.

(DB_ENV->set_lk_detect ´Â µ¥µå¶ô µðÅØÅ͸¦ ¼³Á¤ÇÑ´Ù.ÀÌ ¿É¼ÇÀº ºü¸¥ µ¥µå¶ô  ŽÁö¸¦ Á¦°øÇÑ´Ù.)

In general, when applications are not specifying lock and transaction timeout values, the DB_LOCK_DEFAULT option is probably the correct first choice, and other options should only be selected based on evidence that they improve transaction throughput. If an application has long-running transactions, DB_LOCK_YOUNGEST will guarantee that transactions eventually complete, but it may do so at the expense of a large number of lock request rejections (and therefore, transaction aborts).

(ÀϹÝÀûÀ¸·Î, ¶ô°ú Æ®·£Á§¼Ç ŸÀӾƿô°ªÀÌ ¼³Á¤µÇÁö ¾ÊÀ»¶§ DB_LOCK_DEFAULT¿É¼ÇÀÌ Ã¹¹ø° ¼±ÅÃÇÒ¼ö ÀÖ´Â °ÍÀÌ´Ù.´Ù¸¥ ¿É¼ÇÀº Æ®·£Á§¼Ç ó¸®Çâ»óÀ» È®½ÅÇÒ¶§ ¼±ÅÃµÉ ¼ö ÀÖ´Ù.¸¸¾à ¾ÖÇø®ÄÉÀ̼ÇÀÌ long-runningÆ®·£Á§¼ÇÀ» °¡Áú¶§  DB_LOCK_YOUNGESTÀº Æ®·£Á§¼ÇÀÇ ¸¶Ä§À» º¸ÁõÇÑ´Ù.±×·¯³ª ÀÌ°ÍÀº ¸¹Àº ¶ô ¿äûÀ» °ÅºÎÇÏ°í  (¿ªÀÚÃß°¡:¿äû¾²·¹µåÀÇ)Æ®·£Á§¼ÇÀ» Ãë¼Ò½ÃÅ´À¸·Î ºñ¿ëÀÌ ³ô´Ù.)

The alternative to using the DB_ENV->set_lk_detect method is to explicitly perform deadlock detection using the Berkeley DB DB_ENV->lock_detect method.

( DB_ENV->set_lk_detect»ç¿ë¿¡ ´ëÇÑ ´ë¾ÈÀº ¹öŬ¸®µðºñÀÇ DB_ENV->lock_detect ¸¦ »ç¿ëÇϴ°ÍÀÌ´Ù.)

The DB_ENV->set_lk_conflicts method allows you to specify your own locking conflicts matrix. This is an advanced configuration option, and is almost never necessary.

(DB_ENV->set_lk_conflicts Àº »ç¿ëÀÚ ¶ô Ãæµ¹ ¸ÅÆ®¸¯½º¸¦ ¼³Á¤ÇÑ´Ù.ÀÌ°ÍÀº °ÅÀÇ ¾²Áö ¾Ê°í °í±Þ ¼³Á¤¿É¼ÇÀÌ´Ù.)


PrevRefNext

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.