GNOME Bugzilla – Bug 777173
Drafts and draft attachments not being deleted immediately
Last modified: 2021-07-05 13:25:12 UTC
Looks like drafts aren't being deleted from the database, even though they are removed from the draft folder in the db and on the server. Seems to occur whenever a draft is saved. Query to examine messages that don't exist in any folder shows a number flagged as \Draft > SELECT mt.id,subject,flags,date_field,internaldate FROM MessageTable AS mt LEFT OUTER JOIN MessageLocationTable AS mlt ON mt.id = mlt.message_id WHERE mlt.id is null;
This is going to require a DB version bump to fix, so it's going to have to wait for 0.13.
I've just tried that query on a fresh database (account added 2 days ago). But flags field is empty. sqlite> SELECT mt.id,subject,flags,date_field,internaldate FROM MessageTable AS mt LEFT OUTER JOIN MessageLocationTable AS mlt ON mt.id = mlt.message_id WHERE mlt.id is null; 441||||17-Dec-2017 12:43:33 +0000 442||||17-Dec-2017 12:44:17 +0000 443||||17-Dec-2017 12:44:54 +0000 444||||17-Dec-2017 12:45:09 +0000 445||||17-Dec-2017 12:45:38 +0000 446||||17-Dec-2017 12:48:48 +0000 447||||17-Dec-2017 12:49:32 +0000 448||||17-Dec-2017 12:50:48 +0000 473|||| 494||||19-Dec-2017 09:02:20 +0000 495||||19-Dec-2017 09:03:00 +0000 496||||19-Dec-2017 09:03:34 +0000 504||||19-Dec-2017 13:02:06 +0000 505||||19-Dec-2017 13:02:22 +0000 529||||19-Dec-2017 21:40:33 +0000 530||||19-Dec-2017 21:41:08 +0000 533||||19-Dec-2017 22:06:26 +0000 534||||19-Dec-2017 22:07:36 +0000 535||||19-Dec-2017 22:08:04 +0000
This might be "by design" - looks like the database garbage collector is extremely conservative, it only considers orphan messages that are older than 30 days old and only checks for them every 10 days. That's probably okay for general use, but for a pathological case (e.g. composing a message with large attachments that get repeatedly saved as drafts), Geary couk still eat a lot of disk space. For cases like drafts where we know the message should get cleaned up sooner, we should be able to do better. Retitling to match.
Bump tickets to 0.14 that aren't going to make 0.13.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/geary/-/issues/ Thank you for your understanding and your help.