[Kde-pim] multiple remoteIds in pimitemtable ?
Martin Koller
kollix at aon.at
Mon Oct 21 21:28:26 BST 2013
On Monday 21 October 2013 13:50:40 Daniel Vrátil wrote:
> On Sunday 20 of October 2013 18:04:08 Martin Koller wrote:
> > Hi,
>
> Hi,
>
> >
> > I'm continuing my akonadi quest ...
> >
> > I have a mailing list maildir folder, which contains KDE commit mails.
> > In that I found 1 mail which appears a lot of times (ca. 570), so I checked
> > the akonadi tables ... First I searched for that specific mail on disk, and
> > I found exactly 1 mailfile: .../new/1378129436.R486.linux-d4d3.site:2,S
> > What I see in pimitemtable when I search for that name:
> > select * from pimitemtable where collectionId=223 and remoteid LIKE
> > "1378129436.R486.%"; ...
> > 572 rows
> >
> > Question: Is it allowed (does it make sense) that pimitemtable contains
> > multiple records with the same remoteid ?
>
> Are all the remote IDs same, or does the part after R486. differ?
select * from pimitemtable where collectionId=223 and remoteid="1378129436.R486.linux-d4d3.site:2,S";
55 rows
select * from pimitemtable where collectionId=223 and remoteid="1378129436.R486.linux-d4d3.site";
517 rows
>
> > what is the "rev" column for ?
>
> rev == revision
>
> With each modification, revision number of the item is increased. From the
> remoteID above I believe R486 means that the item has been modified 486 times.
I doubt this. checking sources ...:
maildir.cpp -
static QString createUniqueFileName()
{
qint64 time = QDateTime::currentMSecsSinceEpoch() / 1000;
int r = qrand() % 1000;
QString identifier = QLatin1String( "R" ) + QString::number( r );
QString fileName = QString::number( time ) + QLatin1Char( '.' ) + identifier + QLatin1Char( '.' );
return fileName;
}
so the "R" is just a random number. It's not the same as the revision column in the database.
Here with this > 500 entries, I have the highest rev value of 3 in the database.
> Something weird is happening, I only have few items with revision higher than
> 100.
>
> >
> > What I find strange is that nearly all these records include a wrong size
> > value. The file on disk is really 3677 bytes and in most records I find
> > 7100
>
> The sizes should indeed match.
>
> >
> > - only the records which have rev=0 hold the correct file size and
> > remoteid=1378129436.R486.linux-d4d3.site:2,S and dirty=1 - all records with
> > rev=1 have size=7100 and all of these have
> > remoteId=1378129436.R486.linux-d4d3.site and dirty=0 - one record with
> > rev=2 has size=7150
> >
> > should the size value be the file size in bytes ?
> > Because I find other records (also duplicated ones) where no single size
> > entry is correct (e.g. file on disk=6348, size value in table=8101 or 9962)
>
> This is weird. Maybe the file is somehow corrupted, or the maildir resource
> fails to correctly parse it?
I don't think the file is corrupted.
But what I found out now ist that I have TWO files on disk with the same filename!
./new/1378129436.R486.linux-d4d3.site:2,S
./cur/1378129436.R486.linux-d4d3.site:2,S
They are both mails from commitfilter at new.kstuff.org but they contain completely
different contents. One has
Subject: [kdelibs] solid/solid/backends/udisks2: --verbose
the other
Subject: l10n-kde4/lt/messages/kdepim
(I attach both mails here).
can the fact that two mails have the same filename be a problem which creates such large
amount of duplicates db entries ?
As I think that the function createUniqueFileName() fails to really create unique names,
I checked all my mails (> 82000 currently) to see if there are more duplicate names,
and I really found 8 mails
Would it be good to make the names really unique ?
In maildir.cpp I find comments about a buggy QUuid implementation, which is fixed since
Qt 4.7.0
(I found the relevant bug entry: https://bugreports.qt-project.org/browse/QTBUG-8374 )
What about changing to QUuid::createUuid() now that we have Qt-4.8.x (and if I'm right
the maildir.cpp has already a local fix for the qrandom/seed problem in placem, so it should
be possible even with older Qt versions) ?
> > Would it be possible to develop (or is there already) a tool which cleans
> > the akonadi tables from such wrong records or to check whether the entries
> > are still correct ?
> > (Something like fsck for akonadi)
> > Hmmm... I found that akonadictl already has the option fsck
> > "Check (and attempt to fix) consistency of the internal storage (can take
> > some time)" But running it here does neither take some time nor does it fix
> > the above problems ...
>
> The command only starts a job on the server and terminates immediately, while
> the job is running in the background for some time. However it does not detect
> duplicates, it only cleans up orphaned records and data files, so it won't help
> you much.
ok, thanks.
Then there is room for improvement ;-)
--
Best regards/Schöne Grüße
Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
SVN commit 1364344 by stikonas:
Updated Lithuanian translation.
M +1 -1 libmessagecomposer.po
--- trunk/l10n-kde4/lt/messages/kdepim/libmessagecomposer.po #1364343:1364344
@@ -260,7 +260,7 @@
#: attachment/attachmentmodel.cpp:465
msgctxt "@title column attachment inlined checkbox."
msgid "Suggest Automatic Display"
-msgstr "Si?lyti automatin? monitori?"
+msgstr "Si?lyti automatin? rodym?"
#: autocorrection/composerautocorrectionwidget.cpp:98
msgid "LibreOffice Autocorrection"
-------------- next part --------------
Git commit 951be54a387a23175ba2d3d03c7a956c880eccc4 by Aleix Pol.
Committed on 02/09/2013 at 13:29.
Pushed by apol into branch 'master'.
--verbose
Comment qDebug call, that we cannot disable. It's helpful when
testing/debugging to keep the output to what we are expecting.
Reviewed by Lukas Tinkl
M +1 -1 solid/solid/backends/udisks2/udisksdevicebackend.cpp
http://commits.kde.org/kdelibs/951be54a387a23175ba2d3d03c7a956c880eccc4
diff --git a/solid/solid/backends/udisks2/udisksdevicebackend.cpp b/solid/solid/backends/udisks2/udisksdevicebackend.cpp
index 31ccbcf..d26363c 100644
--- a/solid/solid/backends/udisks2/udisksdevicebackend.cpp
+++ b/solid/solid/backends/udisks2/udisksdevicebackend.cpp
@@ -189,7 +189,7 @@ void DeviceBackend::checkCache(const QString& key) const
/* Store the item in the cache anyway so next time we don't have to
* do the DBus call to find out it does not exist but just check whether
* prop(key).isValid() */
- qDebug() << m_udi << ": property" << key << "does not exist";
+// qDebug() << m_udi << ": property" << key << "does not exist";
}
}
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list