mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
27.46.2015 2d596c11d8c08d2e9fa9550500d0477570469054
OPENDJ-1848: Remove Storage getRMW and putIfAbsent methods

Add some comments in Index.updateKey(...) explaining the current implementation. This methods looks like it makes too many assumptions about the underlying storage.
1 files modified
6 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Index.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Index.java
@@ -239,6 +239,10 @@
    }
    else
    {
      /*
       * Avoid taking a write lock on a record which has hit all IDs because it is likely to be a
       * point of contention.
       */
      ByteString value = read(txn, key, false);
      if(value != null)
      {
@@ -246,7 +250,7 @@
        if (entryIDList.isDefined())
        {
          updateKeyWithRMW(txn, key, deletedIDs, addedIDs);
        }
        } // else the record exists but we've hit all IDs.
      }
      else
      {