Do not overwrite operation failure
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / LocalTransactionContext.java
index 276523e680a6389210edf290fff1a32fff252f23..9398171b202bd2f05a5d9028946ebe26d44ce175 100644 (file)
@@ -113,7 +113,9 @@ abstract class LocalTransactionContext extends AbstractTransactionContext {
     private LocalThreePhaseCommitCohort ready() {
         logModificationCount();
         LocalThreePhaseCommitCohort cohort = readySupport.onTransactionReady(getWriteDelegate());
-        cohort.setOperationError(operationError);
+        if (operationError != null) {
+            cohort.setOperationError(operationError);
+        }
         return cohort;
     }