After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777173 - Drafts and draft attachments not being deleted immediately
Drafts and draft attachments not being deleted immediately
Status: RESOLVED OBSOLETE
Product: geary
Classification: Other
Component: composer
0.11.x
Other Linux
: Normal normal
: 0.14.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-12 12:46 UTC by Michael Gratton
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Gratton 2017-01-12 12:46:50 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;
Comment 1 Michael Gratton 2017-12-04 00:05:21 UTC
This is going to require a DB version bump to fix, so it's going to have to wait for 0.13.
Comment 2 Federico Bruni 2017-12-19 22:43:59 UTC
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
Comment 3 Michael Gratton 2018-04-14 05:55:05 UTC
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.
Comment 4 Michael Gratton 2018-06-26 04:47:52 UTC
Bump tickets to 0.14 that aren't going to make 0.13.
Comment 5 GNOME Infrastructure Team 2021-07-05 13:25:12 UTC
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.