[Akonadi] [Bug 344937] Akonadi keeps multiple revisions of the same message in .local/share/akonadi/file_db_data

Jan K jprofesorek at o2.pl
Sat Apr 18 20:26:33 BST 2015


https://bugs.kde.org/show_bug.cgi?id=344937

Jan K <jprofesorek at o2.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Gentoo Packages             |unspecified
                 CC|                            |dvratil at kde.org,
                   |                            |jprofesorek at o2.pl

--- Comment #3 from Jan K <jprofesorek at o2.pl> ---
Ok, so it's not just me, there are at least two of us ;-)

> are there any files that can be manually deleted as long as this bug is not solved?
> _r0 - _r20 and just keep _r21?
Don't do it.
For me it seems that only low revisions (no higher than third) are in fact used
(checked database with akonadiconsole).
You can just run the script I provided to create hard links - it's safe but
rough workaround.

Now, time for some research...

Finding the part of code that creates the file names is easy:
http://quickgit.kde.org/?p=akonadi.git&a=blob&f=src%2Fserver%2Fstorage%2Fparthelper.cpp
(line 297).

So, it may have arrived with the idea introduced with this commit(↓) and
subsequent commits
http://quickgit.kde.org/?p=akonadi.git&a=commit&h=422c9112d95e0c168c829bd19fed17b467090de1

Let's move on:
That function is called from
http://quickgit.kde.org/?p=akonadi.git&a=blob&f=src%2Fserver%2Fstorage%2Fpartstreamer.cpp
(line 189)
to create name for a new file revision and send the name to client (in line
230) for filling file with data.

Now, the key part is when this function is called. It's called whenever part is
invalid (that is: part.isValid() is false)
We have part from line 284 of the partstreamer.cpp.
This is an object of 'Part' class. A class for which I could not locate any
definition. And the instance is conjured miraculously from the database.

What I cannot find:
* where is the definition of class Akonadi::Server::Part (or the right Part
class)
* when is a valid part considered invalid
* why the database de facto has (for instance) revision 0 and not some of the
recent revisions from the file storage dir
* (extra:) is there a routine to purge redundant revisions?
Can anyone help me there? I don't feel hardcore enough to debug live akonadi
during mail fetch.

I can provide any details for tackling this, just I don't know which matter…


Sorry if I'm breaking netiquette by this, I'm adding to CC list the person
annotated for most commits over there.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Kdepim-bugs mailing list