Describe the bug
When darktable is closed, the user is asked if database maintenance shall be carried out. This question appears at each shut down not matter if the user has answered _yes_ or _later_ before.
To Reproduce
Expected behavior
Pop-up to ask for database maintenance should appear occasionally only.
Screenshots

Platform (please complete the following information):
Additional context
Might be related to #4337. Same issue has been reported on the mailing list.
I don't see this but my db was VACUUMed recently
openSUSE Tumbleweed 20200224
NVIDIA GF106 [GeForce GTS 450], 390.132
darktable 3.1.0~git753.5b1f5c853 (darix's obs builds)
OpenCL on
i7 12-core 36GB
I believe it should be fixed by PR #4373. Can you apply 73f5bcf2cf3ae88dcd9ab71099d6eefb838c56e7 and see if the message goes away after single "yes"?
I've just checked this with darktable 3.1.0+754 and the behaviour is correct (only asked once).
I also quit and started after changing the related options in the preferences and hard-deleted it from the darktablerc file: It is still asked only once.
for a better replicability of the problem, can you please set following options:
database/maintenance_check=on both
database/maintenance_freepage_ratio=10
(can be less than 10)
technically that means same code is executed on startup and close. So if you say yes on startup it shouldn't ask again on close (unless you did some heavy db lifting) and then on next startup it sould still be silent.
BTW: would you rather have that msg by default on startup rather than on close? I'm starting to think startup might be a bit better place.
for a better replicability of the problem, can you please .....
$ grep "^database" darktablerc
database=library.db
database/maintenance_check=on both
database/maintenance_freepage_ratio=5
database_cache_quality=89
When starting dt this results in a window: _the database could use some maintenance / there's ...._.
Scenario 1: I say yes on startup -> it is not asked again on shutdown or during the next start
After resetting:
Scenario 2: I say _later_ on startup -> it is asked again when shutting down. HOWEVER After choosing _yes_ on shutdown it does ask again when I restart dt. (with the same amount that can be freed as mentioned before). The message only disappears when I choose yes on startup.
No messages in the terminal that point to any errors.
BTW: would you rather have that msg by default on startup rather than on close? I'm starting to think startup might be a bit better place.
The first thing I did when I stopped playing/testing it was to set this option to on startup I guess that answers your question :-)
The rationale behind it: Why would I want a smooth/clean db after I'm done?
I believe it should be fixed by PR #4373. Can you apply 73f5bcf and see if the message goes away after single "yes"?
@johnny-bit It seems to be fixed now by #4373. Issue is gone for me.
So closing!