Re: Akonadi dsaster

Daniel Vrátil <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <[email protected]>
I already fixed this in 16.08 branch :) The agent now fully respects the IndexPolicyAttribute including (un)indexing the Collection when the policy changes. 

There was also some regression with regard to reindexing changes to emails (flags etc.) which was fixed too. 

I'm looking into moving the indexing to a separate thread now to improve responsiveness of the agent and fix some of the bugs wrt batch indexing. 


  Original Message  
From: [email protected]
Sent: October 16, 2016 5:41 PM
To: [email protected]
Cc: [email protected]
Subject: Re: Akonadi dsaster

On Friday October 14 2016 10:54:31 Daniel Vrátil wrote:

> I could swear that there was at least partial support in 4.1x, but grepping 
> current codebase I don't see any handling of the IndexPolicyAttribute at all, 
> so probably a regression :(

The actual support for it (beyond managing the setting itself) that I could find with a few quick searches in the 4.14 branch masters seems to be limited to this:

```
void CollectionMaintenancePage::load(const Collection & col)
{
    init( col );
    if ( col.isValid() ) {
        updateLabel( col.statistics().count(), col.statistics().unreadCount(), col.statistics().size() );
        Akonadi::IndexPolicyAttribute *attr = col.attribute<Akonadi::IndexPolicyAttribute>();
        const bool indexingWasEnabled(!attr || attr->indexingEnabled());
        mIndexingEnabled->setChecked( indexingWasEnabled );
        if(!indexingWasEnabled)
            mLastIndexed->hide();
        else {
            QDBusInterface interfaceBalooIndexer( QLatin1String("org.freedesktop.Akonadi.Agent.akonadi_baloo_indexer"), QLatin1String("/") );
            if(interfaceBalooIndexer.isValid()) {
                if (!interfaceBalooIndexer.callWithCallback(QLatin1String("indexedItems"), QList<QVariant>() << (qlonglong)mCurrentCollection.id(), this, SLOT(onIndexedItemsReceived(qint64)))) {
                    kWarning() << "Failed to request indexed items";
                }
            }
        }
    }
}
```

That looks a bit like the indexer always runs, but its results are requested selectively...

R.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.