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

Jean-Noel Rouvignac
22.26.2013 d4ba1923c8724f8865f75261fccc0134021e05a7
Found and fixed a new deadlock with read vs. write locks.

ReplicationDB.java:
Always unlock the readLock when no cursor is held. Fix is similar to r9542 for DraftCNDB.DraftCNDBCursor .
Do not release read lock twice.
1 files modified
10 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java 10 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
@@ -614,14 +614,12 @@
      }
      catch (ChangelogException e)
      {
        // Unlocking is required before throwing any exception
        closeAndReleaseReadLock(localCursor);
        StaticUtils.close(localCursor);
        throw e;
      }
      catch (DatabaseException e)
      {
        // Unlocking is required before throwing any exception
        closeAndReleaseReadLock(localCursor);
        StaticUtils.close(localCursor);
        throw new ChangelogException(e);
      }
      finally
@@ -666,13 +664,13 @@
      }
      catch (ChangelogException e)
      {
        closeAndReleaseReadLock(localCursor);
        StaticUtils.close(localCursor);
        abort(localTxn);
        throw e;
      }
      catch (Exception e)
      {
        closeAndReleaseReadLock(localCursor);
        StaticUtils.close(localCursor);
        abort(localTxn);
        throw new ChangelogException(e);
      }