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

Unable to back out upgrade without wiping database #259

Open
mikaelfrykholm opened this issue Aug 26, 2024 · 4 comments
Open

Unable to back out upgrade without wiping database #259

mikaelfrykholm opened this issue Aug 26, 2024 · 4 comments

Comments

@mikaelfrykholm
Copy link

deserializer-error.log

@martin-lindstrom
Copy link
Member

We need a lot more information here. What database are you referring to?

@mikaelfrykholm
Copy link
Author

The procedure we tried was to upgrade our QA env from 1.1.2 to 1.2.1. The server managed to serialize and save new data to redis and when trying to back out the upgrade the server crashed with the error above. If the keys are volatile they might have expired by them selves. We did try waiting until they did. I did manage to get it running directly by wiping the database though.

@felix-hellman
Copy link
Contributor

@mikaelfrykholm We can fix this for upcoming versions by not letting sessions to be read by other versions. This could perhaps not be sufficient with rolling updates however. I.e. if 50% of the nodes are running version A and 50% of the nodes are running version B and load is balanced between these freely they will get cache-misses on the sessions which will result in errors.

What do you think?

@felix-hellman felix-hellman added bug Something isn't working and removed bug Something isn't working labels Sep 25, 2024
@felix-hellman
Copy link
Contributor

I have been thinking about it a bit and I would strongly recommend a blue/green deployment for this application instead of a rolling update. Otherwise this would get more complicated than it needs to be e.g. handling multiple versions of the underlying relying party api (bankid api).

There are multiple ways to achieve something like this, but it is important to make sure that versions are not being mixed for a given user. I.e. if a user starts on version A it needs to remain on version A.

We could change the versioning scheme @martin-lindstrom but when the underlying api changes and adds more fields we would still need to throw exceptions to make sure versions are not being mixed during a session.

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