mikewalch commented on a change in pull request #953: fixes #917 Added read 
locks
URL: https://github.com/apache/fluo/pull/953#discussion_r147271399
 
 

 ##########
 File path: 
modules/api/src/main/java/org/apache/fluo/api/client/TransactionBase.java
 ##########
 @@ -60,4 +60,26 @@
    * encoded using UTF-8.
    */
   void setWeakNotification(CharSequence row, Column col);
+
+  /**
+   * Normally when a Fluo transaction reads data and does not write to it, it 
will not collide with
+   * other transactions making concurrent writes. However, all reads done 
using this method will
+   * acquire a read lock. These read locks cause collisions with transactions 
doing concurrent
+   * writes. However, multiple transactions can get concurrent read locks on 
the same row+col
+   * without colliding.
+   *
+   * <p>
+   * Scanning with read locks is not supported. Attempting to call {@code 
withReadLock().scanner()}
+   * will throw an {@link UnsupportedOperationException}. This is because 
there are an infinite
+   * amount of keys within a range and read locks can not be obtained on them 
all.
+   *
+   * <p>
+   * A transaction that only acquires read locks will do nothing at commit 
time. In this case no
 
 Review comment:
   Sounds good

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to