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

Load SystemState only when required #1996

Merged

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Jan 9, 2025

No description provided.

@kontura kontura force-pushed the system-state-optimize-report branch from 336ea34 to 7e98d83 Compare January 9, 2025 13:18
@kontura kontura marked this pull request as draft January 16, 2025 10:20
@kontura kontura force-pushed the system-state-optimize-report branch from 7e98d83 to 4acf5a6 Compare January 17, 2025 11:43
Commands that don't need system state are more efficient because they
don't have to load it.

They also don't run into problems caused by the dnf4 history conversion.
Otherwise the database is created and there is a rather complex sql
error because we expect the database to have to specific tables in the
following queries.
The system state is now loaded (converted) only when required.

There are two options:
1. We want to modify system state which requires privileges anyway.
2. We want to only read system state.
   This could require privileges only if we need to convert the system
   state from dnf4 db. If we fail to save the converted system state
   the error is hidden in `reset_packages_states` and we use it normally
   just from memory.
   This means the conversion will repeat until successfully saved.
@kontura kontura force-pushed the system-state-optimize-report branch from 4acf5a6 to e898cc5 Compare January 30, 2025 07:03
@kontura kontura marked this pull request as ready for review January 30, 2025 07:03
@kontura kontura changed the title Load SystemState only when required and report problems Load SystemState only when required Jan 30, 2025
@jrohel jrohel self-assigned this Feb 10, 2025
@jrohel
Copy link
Contributor

jrohel commented Feb 10, 2025

OK

@jrohel jrohel added this pull request to the merge queue Feb 10, 2025
Merged via the queue into rpm-software-management:main with commit 7558a72 Feb 10, 2025
17 checks passed
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.

2 participants