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

deserializing persisted data that has akka classnames #604

Closed
pjfanning opened this issue Aug 31, 2023 · 10 comments
Closed

deserializing persisted data that has akka classnames #604

pjfanning opened this issue Aug 31, 2023 · 10 comments
Milestone

Comments

@pjfanning
Copy link
Contributor

pjfanning commented Aug 31, 2023

  • See Migrating with existing persistence data fails scullxbones/pekko-persistence-mongo#10
  • pekko and akka persistence is not an area I am an expert in but if pekko code tries to deserialize data and the data has an akka classname, then we could try to autoconvert it to a pekko class (try akka first and if it fails, try pekko).
  • it isn't clear why class names are even in the persisted data - this is not always a good idea - it can be used to fool code into loading the wrong classes (if someone has the access to modify the persisted data)
@bdoyle0182
Copy link

I'm testing locally a converter in the serializer in the mongo plugin there and will post back if that solves it, but would be awesome if we could auto convert it in the core code but I'm not sure if that's even possible.

@bdoyle0182
Copy link

bdoyle0182 commented Aug 31, 2023

@He-Pin
Copy link
Member

He-Pin commented Aug 31, 2023

@bdoyle0182 I think this can be done with an spi hook, and then the project will need to implemented it with both akka and pekko in the classpath.

@bdoyle0182
Copy link

bdoyle0182 commented Sep 1, 2023

I think the issue here is plugin specific unfortunately since the storage plugin decides how to serialize / deserialize the data to the db. I'm not sure how you could solve this in core when the plugin will still need to account for this translation based on how they originally set up the data to be stored. You could make it easier providing an spi hook to do the classname translation, but regardless it would still need to be something each plugin maintainer would need to account for.

@pjfanning
Copy link
Contributor Author

we've hit #841 and #838 (same issue, just 2 attempts at fixing it)

@bdoyle0182
Copy link

@pjfanning has that been included in a release yet?

@pjfanning
Copy link
Contributor Author

@bdoyle0182 #841 is not released yet. Will be in Pekko 1.0.3 but that release is not yet scheduled. You can help by trying the latest Pekko snaphots - e.g. 1.0.2+13-9b596fa4-SNAPSHOT

Unfortunately, in a volunteer project - not every volunteer has to worry about migrating akka data - I haven't used Akka in the last 5 years as an example. Some of us have no Akka baggage.

@bdoyle0182
Copy link

I don't have full context on what the fix is for exactly, but if I'm using the fix that I made for the specific plugin for mongo would this be a relevant issue still or would that bypass the issue in these PR's?

@pjfanning
Copy link
Contributor Author

pjfanning commented Jan 5, 2024

I don't have full context on what the fix is for exactly, but if I'm using the fix that I made for the specific plugin for mongo would this be a relevant issue still or would that bypass the issue in these PR's?

I don't follow. Pekko 1.0.3 will be released in a few months. 1.0.3 will include #841

If you don't like snapshots, you could try the full release when it is released. Unfortunately, Pekko has a mismatch between developers with green field work and those who are Akka refugees. The Akka refugees are disengaged. Their disengagement is hindering efforts to help them.

@pjfanning pjfanning added this to the 1.0.x milestone Jan 5, 2024
@pjfanning
Copy link
Contributor Author

1.0.3-M1 was released

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

No branches or pull requests

3 participants