Make sure Serialization.currentTransportInformation is always set, #25067
* The ThreadLocal Serialization.currentTransportInformation is used for serializing local actor refs, but it's also useful when a serializer library e.g. custom serializer/deserializer in Jackson need access to the current ActorSystem. * We set this in a rather ad-hoc way from remoting and in some persistence plugins, but it's only set for serialization and not deserialization, and it's easy for Persistence plugins or other libraries to forget this when using Akka serialization directly. * This change is automatically setting the info when using the ordinary serialize and deserialize methods. * It's also set when LocalActorRefProvider, which wasn't always the case previously. * Keep a cached instance of Serialization.Information in the provider to avoid creating new instances all the time. * Added optional Persistence TCK tests to verify that the plugin is setting this if it's using some custom calls to the serializer.
This commit is contained in:
parent
6ec46e762f
commit
e6633f17fa
36 changed files with 579 additions and 146 deletions
|
|
@ -218,7 +218,7 @@ private[stream] final class SourceRefStageImpl[Out](
|
|||
} // else, ref is valid and we don't need to do anything with it
|
||||
}
|
||||
|
||||
/** @throws InvalidSequenceNumberException when sequence number is is invalid */
|
||||
/** @throws InvalidSequenceNumberException when sequence number is invalid */
|
||||
def observeAndValidateSequenceNr(seqNr: Long, msg: String): Unit =
|
||||
if (isInvalidSequenceNr(seqNr)) {
|
||||
throw InvalidSequenceNumberException(expectingSeqNr, seqNr, msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue