Remove RaftActor#trimPersistentData method 03/17203/1
authorTom Pantelis <tpanteli@brocade.com>
Thu, 26 Mar 2015 00:40:14 +0000 (20:40 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 26 Mar 2015 00:40:14 +0000 (20:40 -0400)
The recent snapshot refactoring moved the code in trimPersistentData to
the SnapsotManager and it's no longer called so should be removed.

Change-Id: Ieb7c3b5595f562b8debf62b2ea5b16e656e5fea4
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java

index 19804111ec1fcf42dc241c3448e67d07c108eb62..b74259d4851153659df0c2866f6323b9234eff06 100644 (file)
@@ -698,17 +698,6 @@ public abstract class RaftActor extends AbstractUntypedPersistentActor {
 
     protected void onLeaderChanged(String oldLeader, String newLeader){};
 
-    private void trimPersistentData(long sequenceNumber) {
-        // Trim akka snapshots
-        // FIXME : Not sure how exactly the SnapshotSelectionCriteria is applied
-        // For now guessing that it is ANDed.
-        persistence().deleteSnapshots(new SnapshotSelectionCriteria(
-            sequenceNumber - context.getConfigParams().getSnapshotBatchCount(), 43200000));
-
-        // Trim akka journal
-        persistence().deleteMessages(sequenceNumber);
-    }
-
     private String getLeaderAddress(){
         if(isLeader()){
             return getSelf().path().toString();