BUG-8402: Separate out OutOfOrderRequestException
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / AbstractFrontendHistory.java
index b7bd46c738d8a6fa5f55ecb09933048592b27c30..8262afa099154c32ffea89a9ad3896d709556f01 100644 (file)
@@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory;
  */
 abstract class AbstractFrontendHistory implements Identifiable<LocalHistoryIdentifier> {
     private static final Logger LOG = LoggerFactory.getLogger(AbstractFrontendHistory.class);
-    private static final OutOfOrderRequestException UNSEQUENCED_START = new OutOfOrderRequestException(0);
 
     private final Map<TransactionIdentifier, FrontendTransaction> transactions = new HashMap<>();
     private final RangeSet<UnsignedLong> purgedTransactions;
@@ -137,7 +136,7 @@ abstract class AbstractFrontendHistory implements Identifiable<LocalHistoryIdent
             // The transaction does not exist and we are about to create it, check sequence number
             if (request.getSequence() != 0) {
                 LOG.debug("{}: no transaction state present, unexpected request {}", persistenceId(), request);
-                throw UNSEQUENCED_START;
+                throw new OutOfOrderRequestException(0);
             }
 
             tx = createTransaction(request, id);
@@ -175,7 +174,7 @@ abstract class AbstractFrontendHistory implements Identifiable<LocalHistoryIdent
         }
         if (request instanceof AbstractReadTransactionRequest) {
             if (((AbstractReadTransactionRequest<?>) request).isSnapshotOnly()) {
-                LOG.debug("{}: allocatint new open snapshot {}", persistenceId(), id);
+                LOG.debug("{}: allocating new open snapshot {}", persistenceId(), id);
                 tree.getStats().incrementReadOnlyTransactionCount();
                 return createOpenSnapshot(id);
             }