Merge "Bug-2590: Clustering : Minimize usage of in-memory journal"
authorMoiz Raja <moraja@cisco.com>
Fri, 6 Feb 2015 23:06:10 +0000 (23:06 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 6 Feb 2015 23:06:11 +0000 (23:06 +0000)
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/__artifactId__-features/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/__artifactId__-impl/src/main/config/default-config.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardCommitCoordinator.java

index 67cc60ab0ffa2ca4a6532d2d7056df269d5fa1bd..49b43f442edba2810196bf470a146df77ba83a71 100644 (file)
@@ -13,6 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>features-parent</artifactId>
     <version>1.5.0-SNAPSHOT</version>
+    <relativePath/>
   </parent>
   <groupId>${groupId}</groupId>
   <artifactId>${artifactId}-features</artifactId>
index db4efb83e38705650574bf6ce482f102b45f429f..e777fd25bcf00e1fc64246a6785f5f823b67f1c3 100644 (file)
@@ -12,6 +12,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
 <snapshot>
   <required-capabilities>
+      <capability>urn:opendaylight:params:xml:ns:yang:${artifactId}:impl?module=${artifactId}-impl&amp;revision=2014-12-10</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
   </required-capabilities>
   <configuration>
 
index 3fc9c142c5e8b40daec717b3292fe1d52afcbf94..744e2c22c69a9de8f16ff048648fbd087066eb41 100644 (file)
@@ -321,7 +321,7 @@ public class Shard extends RaftActor {
                 Shard.this.persistData(getSender(), transactionID,
                         new ModificationPayload(cohortEntry.getModification()));
             }
-        } catch (InterruptedException | ExecutionException | IOException e) {
+        } catch (Exception e) {
             LOG.error(e, "{} An exception occurred while preCommitting transaction {}",
                     persistenceId(), cohortEntry.getTransactionID());
             shardMBean.incrementFailedTransactionsCount();
@@ -373,14 +373,14 @@ public class Shard extends RaftActor {
             shardMBean.incrementCommittedTransactionCount();
             shardMBean.setLastCommittedTransactionTime(System.currentTimeMillis());
 
-        } catch (InterruptedException | ExecutionException e) {
+        } catch (Exception e) {
             sender.tell(new akka.actor.Status.Failure(e), getSelf());
 
             LOG.error(e, "{}, An exception occurred while committing transaction {}", persistenceId(), transactionID);
             shardMBean.incrementFailedTransactionsCount();
+        } finally {
+            commitCoordinator.currentTransactionComplete(transactionID, true);
         }
-
-        commitCoordinator.currentTransactionComplete(transactionID, true);
     }
 
     private void handleCanCommitTransaction(final CanCommitTransaction canCommit) {
index 659acb745473af389480ff08e19cc68857add93a..165e272d8b09ca1631a94e7a1e7d14a4370bb595 100644 (file)
@@ -205,6 +205,7 @@ public class ShardCommitCoordinator {
             // Dequeue the next cohort entry waiting in the queue.
             currentCohortEntry = queuedCohortEntries.poll();
             if(currentCohortEntry != null) {
+                currentCohortEntry.updateLastAccessTime();
                 doCanCommit(currentCohortEntry);
             }
         }