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

Percieved data loss when reloading and MySQL fails #437

Open
3 tasks
diogotcorreia opened this issue Aug 1, 2024 · 4 comments
Open
3 tasks

Percieved data loss when reloading and MySQL fails #437

diogotcorreia opened this issue Aug 1, 2024 · 4 comments
Assignees
Labels
type:bug Something isn't working as expected type:enhancement Improvement or enhancement to existing functionality
Milestone

Comments

@diogotcorreia
Copy link
Member

If Triton is configured to use MySQL and Triton is reloaded (e.g., through /triton reload), it will fallback to local storage if it can't connect to the database.
This makes it seem like all translations are gone.

This problem is exacerbated with the fact that if you download from TWIN after that, those translations will be saved to local storage instead and create two distinct storages.

There are a few things can be improved here:

  • Stop Triton if it can't connect to MySQL. This is better than making it seem like it's working when it is not, and if Triton is configured to use MySQL, it probably means that local storage is empty anyway.
  • Reevaluate HikariCP settings. One common error is "Too many connections".
  • Do partial inserts instead of dropping the entire database and reupload when something has to be saved.
@diogotcorreia diogotcorreia added type:bug Something isn't working as expected type:enhancement Improvement or enhancement to existing functionality labels Aug 1, 2024
@diogotcorreia diogotcorreia added this to the 4.1.0 milestone Aug 1, 2024
@diogotcorreia diogotcorreia self-assigned this Aug 1, 2024
@NaysKutzu
Copy link

I mean when you use MySQL you can like download the hole database as a cache on a local file and then serve that file till a change was made to the database :Ö))

@NaysKutzu
Copy link

Or when uploading you can do the same thing create a local database and serve that :) and just slowly upload the db to host :)

@diogotcorreia
Copy link
Member Author

That kinda defeats the purpose of a database in the first place 😅
And it's likely that most of your server will not work if the database is down anyway, so it shouldn't matter if Triton stops itself or something similar

@NaysKutzu
Copy link

Ik but that how most web app's do just save cache and server cache till some change :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working as expected type:enhancement Improvement or enhancement to existing functionality
Projects
Status: No status
Development

No branches or pull requests

2 participants