db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "LockDebugging" by KimHaase
Date Thu, 07 Feb 2013 19:13:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The "LockDebugging" page has been changed by KimHaase:
http://wiki.apache.org/db-derby/LockDebugging?action=diff&rev1=6&rev2=7

  
  In order to understand how your application affects locking in the database, you should
first get a basic understanding the relationship between the different types of locks, concurrency
modes (isolation levels), transaction lifetimes, etc. in Derby.
  
- The [[http://db.apache.org/derby/manuals/index.html|Derby manuals]] include lots of useful
information on concurrency and locking in Derby. For example, the [[http://db.apache.org/derby/docs/dev/devguide/|Derby
Developer's Guide]] contains an entire chapter entitled [[http://db.apache.org/derby/docs/dev/devguide/cdevconcepts30291.html|''Locking,
concurrency, and isolation'']].
+ The [[http://db.apache.org/derby/manuals/index.html|Derby manuals]] include lots of useful
information on concurrency and locking in Derby. For example, the ''Derby Developer's Guide''
contains an entire chapter entitled "Locking, concurrency, and isolation".
  
  Try to envision how this would work in your particular application.
  
@@ -31, +31 @@

  . The selected victim is XID : 235. 
  }}}
  
- If you don't see such output, you may need to set the [[http://db.apache.org/derby/docs/dev/ref/rrefproper23835.html|derby.locks.deadlockTrace]]
property or some of the other derby.locks. properties, or upgrade to a newer version of Derby.
The various properties you can set are described in the [[http://db.apache.org/derby/docs/dev/tuning/|Tuning
Guide]], and some usage is [[http://db.apache.org/derby/docs/dev/devguide/cdevconcepts16400.html|described]]
in the Developer's Guide.
+ If you don't see such output, you may need to set the ''derby.locks.deadlockTrace'' property
or some of the other ''derby.locks.'' properties, or upgrade to a newer version of Derby.
The various properties you can set are described in the ''Derby Reference Manual'', and some
usage is described in the ''Developer's Guide'' in "Configuring deadlock detection and lock
wait timeouts".
  
  === Lock timeouts ===
  
@@ -39, +39 @@

  {{{
  java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested.
  }}}
- If you have enabled the [[http://db.apache.org/derby/docs/dev/ref/rrefproper23835.html|derby.locks.deadlockTrace]]
property, you will probably also see a dump of the lock table at the time of the timeout,
for example:
+ If you have enabled the ''derby.locks.deadlockTrace'' property, you will probably also see
a dump of the lock table at the time of the timeout, for example:
  {{{
  java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested.
The lockTable dump is:
  2007-06-15 11:34:06.748 GMT
@@ -57, +57 @@

  171 |ROW |X |3 |(1,7) |GRANT|T |NULL |T | 
  }}}
  
- If you don't see such a lock table dump even when the deadlockTrace property has been enabled,
consult the Derby Developer's Guide.
+ If you don't see such a lock table dump even when the deadlockTrace property has been enabled,
consult the ''Derby Developer's Guide''.
  See also [[http://db.apache.org/derby/faq.html#debug_lock_timeout|the FAQs]].
  
  It is also possible to obtain a snapshot of the lock table of a running database by executing
the following statement:
@@ -65, +65 @@

  select * from syscs_diag.lock_table; 
  }}}
  
- More information about the lock table and other diagnostic tables and functions can be found
on the [[http://db.apache.org/derby/docs/dev/ref/rrefsyscsdiagtables.html|SYSCS_DIAG diagnostic
tables and functions]] page in the Derby Reference Manual.
+ More information about the lock table and other diagnostic tables and functions can be found
on the "SYSCS_DIAG diagnostic tables and functions" pages in the ''Derby Reference Manual''.
  
  === Interpreting the diagnostics ===
  
  Not every aspect of the debug information mentioned above (deadlock traces or lock table
dumps) is intuitive to the average user of Derby. This section is intended to provide information
that may be helpful in deciphering the output. 
  
- Much of the format of the lock table is described [[http://db.apache.org/derby/javadoc/engine/org/apache/derby/diag/LockTable.html|in
the Javadoc of the internal class org.apache.derby.diag.LockTable]].
+ Much of the format of the lock table is described in the Javadoc of the internal class org.apache.derby.diag.LockTable.
  
  There is also a useful page showing example usage of two relevant diagnostics tables in
[[http://publib.boulder.ibm.com/infocenter/cldscp10/index.jsp?topic=/com.ibm.cloudscape.doc/hubprnt57.htm|the
Cloudscape Administration Guide]] (mind that some information on that page might be outdated).
  

Mime
View raw message