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

gbellato
19.46.2008 2184755edaf0785918ed03aabc991b7e3a9f6751
Fix for 2968 : dependent ADD operation can incorrectly generate conflicting entries

With the following sequence of operation :
Add first entry with DN X
delete first entry with DN X
Add another entry with DN X

The second ADD is sometimes not computed as dependent and a false
DN conflict is sometime created.

This happens when the delete operation complete after we tried to process the second
add but before we check for dependencies in the operation queue.

To avoid this problem all operations must be attempted twice before going into
the conflict resolution mechanism, unfortunately in this case, we were not checking if
this is the first try he operation is attempted and therefore were going directory into
conflict resolution.
1 files modified
6 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java 6 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -1345,7 +1345,7 @@
            {
              ModifyOperation newOp = (ModifyOperation) op;
              dependency = remotePendingChanges.checkDependencies(newOp);
              if (!dependency)
              if ((!dependency) && (!firstTry))
              {
                done = solveNamingConflict(newOp, msg);
              }
@@ -1362,7 +1362,7 @@
              AddOperation newOp = (AddOperation) op;
              AddMsg addMsg = (AddMsg) msg;
              dependency = remotePendingChanges.checkDependencies(newOp);
              if (!dependency)
              if ((!dependency) && (!firstTry))
              {
                done = solveNamingConflict(newOp, addMsg);
              }
@@ -1370,7 +1370,7 @@
            {
              ModifyDNMsg newMsg = (ModifyDNMsg) msg;
              dependency = remotePendingChanges.checkDependencies(newMsg);
              if (!dependency)
              if ((!dependency) && (!firstTry))
              {
                ModifyDNOperationBasis newOp = (ModifyDNOperationBasis) op;
                done = solveNamingConflict(newOp, msg);