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

clean: Park/cleanup sqlite databases #2011

Open
cgwalters opened this issue Jan 14, 2025 · 1 comment
Open

clean: Park/cleanup sqlite databases #2011

cgwalters opened this issue Jan 14, 2025 · 1 comment
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@cgwalters
Copy link

I recently discovered that libdnf has its own sqlite database in /usr/lib/sysimage/libdnf5/transaction_history.sqlite. This has the same problem as rpm-software-management/rpm#2219

Basically something like dnf clean all should automatically park both databases.

@ppisar
Copy link
Contributor

ppisar commented Jan 15, 2025

Removing the transaction_history.sqlite-shm and transaction_history.sqlite-wal files creates a risk of a race with another DNF process using that database. We will need to scrutinize "dnf clean all" regarding ensuring an exclusive write and read access to the transaction_history database.

Pointers for further investigation:

https://www.sqlite.org/wal.html
SQLite3::open() in libdnf5/utils/sqlite3/sqlite3.cpp

I don't think DNF is going to touch RPM database directly. RPM would need first expose that cleanup feature through its API and then "dnf clean all" could use it.

@ppisar ppisar added RFE Request For Enhancement (as opposed to a bug) Priority: LOW Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: LOW RFE Request For Enhancement (as opposed to a bug) Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants