Skip to content

Commit

Permalink
remove source plugin check
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Jan 22, 2024
1 parent df8a684 commit a1d5ddf
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class MigrationTool(system: ActorSystem[_]) {
val stateSerializer = serialization.findSerializerFor(stateAnyRef)
val stateManifest = Serializers.manifestFor(stateSerializer, stateAnyRef)

// not possible to preserve timestamp
// not possible to preserve timestamp, because not included in GetObjectResult
val timestamp = Instant.now()

val serializedRow = SerializedStateRow(
Expand All @@ -460,22 +460,19 @@ class MigrationTool(system: ActorSystem[_]) {
Some(serializedState),
stateSerializer.identifier,
stateManifest,
tags = Set.empty // not possible to preserve tags
tags = Set.empty // not possible to preserve tags, because not included in GetObjectResult
)
serializedRow
}

private def loadSourceDurableState(persistenceId: String, minRevision: Long): Future[Option[SelectedDurableState]] = {
if (sourceDurableStatePluginId == "")
Future.successful(None)
else
sourceDurableStateStore
.getObject(persistenceId)
.map {
case GetObjectResult(Some(value), revision) if revision >= minRevision =>
Some(SelectedDurableState(persistenceId, revision, value))
case _ => None
}
sourceDurableStateStore
.getObject(persistenceId)
.map {
case GetObjectResult(Some(value), revision) if revision >= minRevision =>
Some(SelectedDurableState(persistenceId, revision, value))
case _ => None
}
}

}

0 comments on commit a1d5ddf

Please sign in to comment.