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

Jean-Noel Rouvignac
23.18.2014 26973bfdb138ebbe760005ee1fc07c28781d4fdb
PersistItStorage.java:
Removed FIXME because now we know there is actually nothing to fix :)
1 files modified
13 ■■■■ changed files
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/persistit/PersistItStorage.java 13 ●●●● patch | view | raw | blame | history
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/persistit/PersistItStorage.java
@@ -25,7 +25,7 @@
 */
package org.opends.server.backends.persistit;
import static org.opends.server.util.StaticUtils.getFileForPath;
import static org.opends.server.util.StaticUtils.*;
import java.io.File;
import java.util.HashMap;
@@ -73,10 +73,7 @@
    @Override
    public void close()
    {
      /*
       * Release immediately because this exchange did not come from the txn
       * cache.
       */
      // Release immediately because this exchange did not come from the txn cache
      db.releaseExchange(ex);
    }
@@ -340,11 +337,13 @@
    {
      try
      {
        // There is no CAS (Compare And Swap) operation to do here :)
        // Following code is fine because Persistit provides snapshot isolation.
        // If another thread tries to update the same key, we'll get a RollbackException
        // And the write operation will be retried (see write() method in this class)
        final Exchange ex = getExchange(treeName);
        bytesToKey(ex.getKey(), key);
        ex.fetch();
        // FIXME poor man's CAS: this will not work under high volume,
        // but PersistIt does not provide APIs for this use case.
        final Value exValue = ex.getValue();
        if (exValue.isDefined())
        {