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

gbellato
24.16.2007 6a128e1541d50348fece5582ec51885e7461f24c
fix for issue 1161 : too much code inside the pendingChanges lock

When doing scalability tests I've noticed that some of the code inside
the SynchronizationDomain.pendingChanges lock is not usefull.

I've therefore moved it outside of the lock.
There are no tests for this because this is only a small perf improvement.
1 files modified
7 ■■■■■ changed files
opends/src/server/org/opends/server/synchronization/plugin/SynchronizationDomain.java 7 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/synchronization/plugin/SynchronizationDomain.java
@@ -1253,11 +1253,12 @@
  private ChangeNumber generateChangeNumber(Operation operation)
  {
    ChangeNumber changeNumber;
    changeNumber = changeNumberGenerator.NewChangeNumber();
    PendingChange change = new PendingChange(changeNumber, operation, null);
    synchronized(pendingChanges)
    {
      changeNumber = changeNumberGenerator.NewChangeNumber();
      pendingChanges.put(changeNumber,
          new PendingChange(changeNumber, operation, null));
      pendingChanges.put(changeNumber, change);
    }
    return changeNumber;
  }