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

fix: prevent inserting affiliations and subscriptions to db if allready exists #2043

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mightymop
Copy link
Contributor

@mightymop mightymop commented Apr 20, 2022

@guusdk
Copy link
Member

guusdk commented May 10, 2022

Thanks for the PR! I do have a concern that this ignores a potential data corruption. Can you please explain how the problem can be triggered?

@mightymop
Copy link
Contributor Author

mightymop commented May 11, 2022

Thanks for the PR! I do have a concern that this ignores a potential data corruption. Can you please explain how the problem can be triggered?

The issue only occurs on our production system but not on the testsystem… so hard to say what is causing it… the difference is the amount of users currently logged in but they are mostly not more then 400!?
I saw in the code (in one class) that you allready had a member variable to check if the object is allready in the db or not and i cloned the checks for the other classes too.
The PR fixes the issue on my system. Maybe it is a timing problem between flushing/clearing the cache and writing data to DB

PS:
i am using SQL Server

@Fishbowler
Copy link
Member

What happens to the state when a Node is loaded from the database on boot? From a plain reading, the isSavedToDB would be false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants