Openfire icon indicating copy to clipboard operation
Openfire copied to clipboard

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

Open mightymop opened this issue 4 years ago • 3 comments

This PR fixes the following issue: https://discourse.igniterealtime.org/t/some-db-issues-sql-server-with-4-7-1/91552

mightymop avatar Apr 20 '22 19:04 mightymop

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?

guusdk avatar May 10 '22 12:05 guusdk

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

mightymop avatar May 11 '22 04:05 mightymop