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

Prevent folder order inconsistency #1877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barijaona
Copy link
Member

I noticed that running two concurrent instances of Vienna led to inconsistencies which led Vienna to reset its folders to alphabetical order.

This change will make new versions of Vienna have a safer behavior. However, problems can still arise when an older version of Vienna (or any app manipulating messages.db) is launched while a corrected version is already running.

Issues #1768, #1779 and #1824

I noticed that running two concurrent instances of Vienna led to
inconsistencies which led Vienna to reset its folders to alphabetical
order.

This change will make new versions of Vienna have a safer behavior.
However, problems can still arise when an older version of Vienna (or
any app manipulating messages.db) is launched while a corrected
version is already running.

Issues ViennaRSS#1768, ViennaRSS#1779 and ViennaRSS#1824
@barijaona barijaona force-pushed the preserveFolderOrder branch from 025c913 to 886d30d Compare March 12, 2025 18:08
@Eitot
Copy link
Contributor

Eitot commented Mar 13, 2025

Have you considered transactions? FMDatabaseQueue supports those as well. I don't know if those would affect database access across app instances though.

@TAKeanice
Copy link
Contributor

If you have a proper database server, transactions are made exactly for the purpose of preventing simultaneous access to the same data. The kind of access that cannot happen in parallel (e.g. writing or reading+writing or even only reading) is regulated by the transaction isolation level.

However in this case I think, the DB is embedded twice, and not run as a server. I don't know enough about this particular database to say if it somehow also maintains transactional access when embedded, but that seems unlikely to me.

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

Successfully merging this pull request may close these issues.

3 participants