CDS Frontend client actor should delete prior snapshots 72/42272/4
authorTom Pantelis <tpanteli@brocade.com>
Thu, 21 Jul 2016 19:57:35 +0000 (15:57 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 29 Jul 2016 02:05:23 +0000 (02:05 +0000)
commitb08cf9e64783ce7db00b6e41f2720f56b726d3b5
tree70059138b3c5faca1215b71ac244c5fd75d08c4f
parentad98c16f6f690874866b6c218c178489e7f4b373
CDS Frontend client actor should delete prior snapshots

The RecoveringClientActorBehavior increments the last generation id and
saves a new snapshot. However the prior snapshots remain in akka
persistence - every time the controller is restarted a new snapshot file
is created. We should delete the prior snaphsots.

The snapshot file names were very long with escape chars b/c
FrontendIdentifier.toString is used for the frontend client actor's
persistence ID. We should use a shorter, more readable ID, so I changed
it to the form:

  member-1-frontend-datastore-config
  member-1-frontend-datastore-operational

Change-Id: I1c77c826729ca1a36497a1236ac99f7cc77efb72
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/FrontendIdentifier.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/AbstractClientActor.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/InitialClientActorContext.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/actors/client/SavingClientActorBehavior.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java