This commit is contained in:
parent
1f8225087f
commit
d24c1e0ede
3 changed files with 9 additions and 9 deletions
|
|
@ -321,8 +321,6 @@ private[akka] class PersistentShard(
|
|||
|
||||
override def snapshotPluginId: String = settings.snapshotPluginId
|
||||
|
||||
var persistCount = 0
|
||||
|
||||
// would be initialized after recovery completed
|
||||
override def initialized(): Unit = {}
|
||||
|
||||
|
|
@ -334,8 +332,7 @@ private[akka] class PersistentShard(
|
|||
}
|
||||
|
||||
def saveSnapshotWhenNeeded(): Unit = {
|
||||
persistCount += 1
|
||||
if (persistCount % snapshotAfter == 0) {
|
||||
if (lastSequenceNr % snapshotAfter == 0 && lastSequenceNr != 0) {
|
||||
log.debug("Saving snapshot, sequence number [{}]", snapshotSequenceNr)
|
||||
saveSnapshot(state)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,8 +729,6 @@ class PersistentShardCoordinator(typeName: String, settings: ClusterShardingSett
|
|||
|
||||
override def snapshotPluginId: String = settings.snapshotPluginId
|
||||
|
||||
var persistCount = 0
|
||||
|
||||
override def receiveRecover: Receive = {
|
||||
case evt: DomainEvent ⇒
|
||||
log.debug("receiveRecover {}", evt)
|
||||
|
|
@ -793,8 +791,7 @@ class PersistentShardCoordinator(typeName: String, settings: ClusterShardingSett
|
|||
}
|
||||
|
||||
def saveSnapshotWhenNeeded(): Unit = {
|
||||
persistCount += 1
|
||||
if (persistCount % snapshotAfter == 0) {
|
||||
if (lastSequenceNr % snapshotAfter == 0 && lastSequenceNr != 0) {
|
||||
log.debug("Saving snapshot, sequence number [{}]", snapshotSequenceNr)
|
||||
saveSnapshot(state)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -767,7 +767,13 @@ object MiMa extends AutoPlugin {
|
|||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.http.impl.util.package.printEvent"),
|
||||
|
||||
// #20362 - parser private
|
||||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.http.impl.model.parser.CommonRules.expires-date")
|
||||
ProblemFilters.exclude[ReversedMissingMethodProblem]("akka.http.impl.model.parser.CommonRules.expires-date"),
|
||||
|
||||
// #20319 - remove not needed "no. of persists" counter in sharding
|
||||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.PersistentShard.persistCount"),
|
||||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.PersistentShard.persistCount_="),
|
||||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.PersistentShardCoordinator.persistCount"),
|
||||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.cluster.sharding.PersistentShardCoordinator.persistCount_=")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue