-
Notifications
You must be signed in to change notification settings - Fork 2k
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
AdoNetGrainStorage HashPicker customization support #9141
Comments
I agree 100%, this is keeping a lot of people from actually migrating from what I see. @ReubenBond what do you think about this? |
Agree with this analysis and it is preventing us from migrating to Orleans 8 as well. @ReubenBond do you feel that the workaround provided would be an appropriate solution or is there an alternative you could recommend? I have to imagine this is a common issue for people migrating off of 3.x who would like to keep their data - wondering how others have dealt with this. |
Great idea! If you are happy to open a PR, we will review & merge it. If you're willing to share the code you used to accomplish this, that would also be very useful to others. |
Ok, I'll prepare a PR in the next few days |
I can test it as well. |
I also published 3.7.2->8.2.0 migration sample against MySQL/PostgreSQL: https://github.com/vladislav-prishchepa/orleans_3_to_8_migration_poc The implementation turned out to be a little more tricky because I've found another breaking change: in v3 |
Hi,
I have several clusters powered by Orleans v3.x with ADO.NET grain persistence (MySQL/PostgreSQL, payload in json/jsonb column) and want to upgrade them to v8.2+ with reasonable downtime (shutdown cluster -> deploy new version) and without persistent state loss. To achieve this goal I've tried to:
PersistentStateAttribute
And it's almost here but with one problem:
GrainIdHash
andGrainTypeHash
mismatch.As I can see hashing algorithm was changed from JenkinsHash to xxHash32 in v7 (#7949). So, to complete the upgrade we need to handle this hashing change. Changing values in database seems to be too hard (big table without primary key, unable to compute new hashes just using SQL). But we have another way to do it: customizing
HashPicker
inAdoNetGrainStorage
. Unfortunately, this property can't be simply configured via dependency injection and the only way to do it is something like that:Although it works (upgraded cluster behaves as expected, existing grain state is available), this workaround is not reliable as it depends on internal Orleans implementation and could stop working after future updates.
Taking into account the above, I propose the following changes:
This new property should have the same behavior as
AdoNetGrainStorageOptions.GrainStorageSerializer
with setting default value viaPostConfigure
if it'snull
.Also it would be nice to add public Orleans v3-compatible
IHasher
implementation to keep customers from copy-paste JenkinsHash-based hasher.In addition, I suppose this v3->v7 hashing change should be described in migration guide as its handling is a required step to migrate existing cluster without data loss.
The text was updated successfully, but these errors were encountered: