Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization pipeline Fixes/improvements #22

Merged

Conversation

to11mtm
Copy link
Member

@to11mtm to11mtm commented May 2, 2021

  • Fix an Edge case around recovering Old Journal entries that did not include a Serializer Identifier.
  • Improved NumericRangeEntry behavior to use a yield for it's Enumerator instead of allocating a bunch of lists.
  • Use new TState overloads For Seriallizer .WithTransport methods to improve copies just a little
  • Make sure we are always transacting for batched writes so we correctly on all edge cases

@to11mtm to11mtm force-pushed the serialization-pipeline-improvements branch from 0bbd829 to 3748fcf Compare May 2, 2021 18:01
Comment on lines -84 to +119
deserialized =
Akka.Serialization.Serialization.WithTransport(
_serializer.System,
() => deserializer.FromBinary(t.message, type));

return new Try<(IPersistentRepresentation, IImmutableSet<string>
, long)>((
new Persistent( Akka.Serialization.Serialization.WithTransport(
_serializer.System, (_serializer.FindSerializerForType(type,_journalConfig.DefaultSerializer),t.message,type),
(state) =>
{
return state.Item1.FromBinary(
state.message, state.type);
}), t.sequenceNumber,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we look closely here, we are using FindSerializerForType here where we weren't previously. I think this was an oopsie in moving over the Serialization dance from SqlJournal, and it wasn't caught before because it would ONLY trip as a case when recovering from a very old version of the journal where we did not include an Identifier.

@to11mtm
Copy link
Member Author

to11mtm commented May 3, 2021

@Aaronontheweb Looks like Docker tests failing somehow =/. Confused cause I'm not sure what I broke?

@to11mtm to11mtm marked this pull request as ready for review May 23, 2021 02:59
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 23, 2021 18:53
@Aaronontheweb Aaronontheweb merged commit 24a798d into akkadotnet:dev Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants