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

Nicolas Capponi
18.23.2014 70d13956bc76d9f3ef4f651239ada1a00cacb85c
Add missing synchronization on replicaCursors in FileChangelogDB class
1 files modified
6 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java 6 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java
@@ -785,6 +785,8 @@
    else if (cursor instanceof ReplicaCursor)
    {
      final ReplicaCursor replicaCursor = (ReplicaCursor) cursor;
      synchronized (replicaCursors)
      {
      final List<ReplicaCursor> cursors = replicaCursors.get(replicaCursor.getReplicaID());
      if (cursors != null)
      {
@@ -792,6 +794,7 @@
      }
    }
  }
  }
  /** {@inheritDoc} */
  @Override
@@ -851,6 +854,8 @@
  private void updateCursorsWithOfflineCSN(final DN baseDN, final int serverId, final CSN offlineCSN)
  {
    synchronized (replicaCursors)
    {
    final List<ReplicaCursor> cursors = replicaCursors.get(Pair.of(baseDN, serverId));
    if (cursors != null)
    {
@@ -860,6 +865,7 @@
      }
    }
  }
  }
  /**
   * The thread purging the changelogDB on a regular interval. Records are