[jboss-cvs] JBossCache/docs/JBossCache-UserGuide/en/modules ...
Brian Stansberry
brian.stansberry at jboss.com
Mon Jan 29 21:52:22 EST 2007
User: bstansberry
Date: 07/01/29 21:52:22
Modified: docs/JBossCache-UserGuide/en/modules
configuration_reference.xml transactions.xml
Log:
[JBCACHE-955] Add LockParentForChildInsertRemove
Revision Changes Path
1.7 +16 -0 JBossCache/docs/JBossCache-UserGuide/en/modules/configuration_reference.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: configuration_reference.xml
===================================================================
RCS file: /cvsroot/jboss/JBossCache/docs/JBossCache-UserGuide/en/modules/configuration_reference.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- configuration_reference.xml 30 Jan 2007 02:06:03 -0000 1.6
+++ configuration_reference.xml 30 Jan 2007 02:52:22 -0000 1.7
@@ -40,6 +40,9 @@
-->
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
+ <!-- Lock parent before doing node additions/removes -->
+ <attribute name="LockParentForChildInsertRemove">true</attribute>
+
<!--
Valid modes are LOCAL
REPL_ASYNC
@@ -346,6 +349,19 @@
<row>
<entry>
+ <para>LockParentForChildInsertRemove</para>
+ </entry>
+
+ <entry>
+ <para>Whether inserting or removing a node requires a write lock
+ on the node's parent (when pessimistic locking is used.) Default
+ is <literal>true</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
<para>MultiplexerService</para>
</entry>
1.6 +18 -3 JBossCache/docs/JBossCache-UserGuide/en/modules/transactions.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: transactions.xml
===================================================================
RCS file: /cvsroot/jboss/JBossCache/docs/JBossCache-UserGuide/en/modules/transactions.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- transactions.xml 30 Jan 2007 02:06:03 -0000 1.5
+++ transactions.xml 30 Jan 2007 02:52:22 -0000 1.6
@@ -124,9 +124,9 @@
<listitem>
<para>REPEATABLE_READ. Data can be read while there is no write and
vice versa. This level prevents "non-repeatable read" but it does not
- prevent the so-called "phantom read" where new data can be inserted
- into the tree from the other transaction. Implementations typically
- use a read-write lock. This is the default isolation level used.
+ completely prevent the so-called "phantom read" where new data can be
+ inserted into the tree from another transaction. Implementations
+ typically use a read-write lock. This is the default isolation level used.
</para>
</listitem>
@@ -140,6 +140,21 @@
</orderedlist>
</section>
+
+ <section>
+ <title>Insertion and Removal of Nodes</title>
+
+ <para>
+ By default, before inserting a new node into the tree or removing an existing node from the
+ tree, JBoss Cache will attempt to acquire a write lock on the new node's parent node. This
+ approach treats child nodes as an integral part of a parent node's state. This approach
+ provide greater correctness, but at a cost of lesser concurrency if nodes are frequently
+ added or removed. For use cases where this greater correctness is not meaningful, JBoss
+ Cache provides a configuration option <literal>LockParentForChildInsertRemove</literal>.
+ If this is set to <literal>true</literal>, insertions and removals of child nodes only
+ require the acquisition of a <emphasis>read lock</emphasis> on the parent node.
+ </para>
+ </section>
</section>
<section>
More information about the jboss-cvs-commits
mailing list