You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
The Persitence Manager saves once something has been changed in any of the other managers. When loading it will do the same (which creates unneccesary writes but that's another problem). But when you don't wait long enough after it has started loading and adds all entries back and stop nodecg this will result in a corrupted config because some of the config haven't been set again and the PersitenceManager will have written the current state without this config.
On the next start you will see error messages because the config isn't just a empty object but undefined:
info: [nodecg-io-core] Couldn't load config of instance "tw-chat" from saved configuration: Config invalid: data should be object.
How to reproduce
Start nodecg normally and login, leave the browser tab open
Restart nodecg
As the browser reconnects and nodecg-io starts loading the config stop it
Start it back up and see that almost all configs are deleted (depends on timing)
The text was updated successfully, but these errors were encountered:
hlxid
added
bug
Something isn't working
urgent
When something is more than just 'it's an open source project' important
framework
Requires changes to the framework
labels
Mar 12, 2021
Lowers effect #217 a lot. Will be re-added once that is fixed
hlxid
changed the title
PersistanceManager can corrupt config due to a race condition
PersistenceManager can corrupt config due to a race condition
Mar 12, 2021
Description
The Persitence Manager saves once something has been changed in any of the other managers. When loading it will do the same (which creates unneccesary writes but that's another problem). But when you don't wait long enough after it has started loading and adds all entries back and stop nodecg this will result in a corrupted config because some of the config haven't been set again and the PersitenceManager will have written the current state without this config.
On the next start you will see error messages because the config isn't just a empty object but
undefined
:How to reproduce
The text was updated successfully, but these errors were encountered: