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

Matthew Swift
23.42.2014 7379a9dbe19606e4ab70db41e18ef84a4f820f0d
opendj3-server-dev/src/server/org/opends/server/backends/persistit/PersistItStorage.java
@@ -238,7 +238,12 @@
        @Override
        public Cursor openCursor(TreeName treeName) {
            try {
                return new CursorImpl(getExchange(treeName));
              /*
               * Acquire a new exchange for the cursor rather than using a cached
               * exchange in order to avoid reentrant accesses to the same tree
               * interfering with the cursor position.
               */
                return new CursorImpl(getExchange0(treeName, false));
            } catch (PersistitException e) {
                throw new StorageRuntimeException(e);
            }
@@ -371,8 +376,11 @@
        @Override
        public void close() {
            // Exchange is released by StorageImpl.release()
            // once the Read/Write Operation is closed
            /*
             * Release immediately because this exchange did not come from the txn
             * cache.
             */
            db.releaseExchange(ex);
        }
    }