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

Why is there an error when the user loads the UI during a database refresh, when some plugins are still being compiled? #126

Open
Apollo3zehn opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Apollo3zehn
Copy link
Member

Context from #116:

[QUESTION] We should check out the method RefreshDatabaseAsync in line 29: In line 51 you make an assignment to refreshDatabaseTask but it appears that the variable is not used anymore after that. Is refreshDatabaseTask a reference to AppState.ReloadPackagesTask?

I think I did this out of fear that the task being assigned to refreshDatabaseTask could be garbage collected if I do not assign it to a variable. But I read somewhere that tasks are never garbage collected and run until their end. I need to think about this more and would like to move it to an extra issue as this is unrelated to this PR. The reason an extra issue is needed is because Nexus throws exceptions when the database is being refreshed and the user loads the UI before the refresh task completed. This happens frequently when a new plugin version is being cloned and compile as this takes a few seconds. The original design idea of this method was to ensure that the old database is being used until the new one is ready and no exceptions should be thrown. But somehow this does not work properly.

@Apollo3zehn Apollo3zehn added the bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant