commit kdepimlibs4 for openSUSE:Factory
Hello community, here is the log from the commit of package kdepimlibs4 for openSUSE:Factory checked in at 2013-12-02 12:31:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepimlibs4 (Old) and /work/SRC/openSUSE:Factory/.kdepimlibs4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kdepimlibs4" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepimlibs4/kdepimlibs4.changes 2013-10-03 15:54:32.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdepimlibs4.new/kdepimlibs4.changes 2013-12-02 12:31:03.000000000 +0100 @@ -1,0 +2,26 @@ +Sat Nov 16 17:47:55 UTC 2013 - tittiatcoke@gmail.com + +- Update to 4.11.90 + * KDE 4.12 Beta 2 release + * See http://www.kde.org/announcements/announce-4.12-beta2.php +- Added Fixed-refcounting in-ETM-and-Monitor.patch from upstream + 4.11 branch, for resolving issue where KMail did not show new + messages, (kde#312460) + +------------------------------------------------------------------- +Sat Nov 9 22:48:48 UTC 2013 - tittiatcoke@gmail.com + +- Update to 4.11.80 + * KDE 4.12 Beta 1 release + * See http://www.kde.org/announcements/announce-4.12-beta1.php +- Bump minimal libakonadiprotocolinternals-devel BuildRequires to + 1.10.45 + +------------------------------------------------------------------- +Sat Nov 2 15:01:24 UTC 2013 - tittiatcoke@gmail.com + +- Update to 4.11.3 + * KDE 4.11.3 bugfix release + * See http://www.kde.org/announcements/announce-4.11.3.php + +------------------------------------------------------------------- Old: ---- kdepimlibs-4.11.2.tar.xz New: ---- Fixed-refcounting-in-ETM-and-Monitor.patch kdepimlibs-4.11.90.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepimlibs4.spec ++++++ --- /var/tmp/diff_new_pack.qNOsRJ/_old 2013-12-02 12:31:05.000000000 +0100 +++ /var/tmp/diff_new_pack.qNOsRJ/_new 2013-12-02 12:31:05.000000000 +0100 @@ -17,7 +17,7 @@ Name: kdepimlibs4 -Version: 4.11.2 +Version: 4.11.90 Release: 0 Summary: KDE PIM Libraries License: LGPL-2.1+ @@ -27,11 +27,13 @@ Patch1: disable-pth-build.diff # ldapkio-kolab3.diff: Add LDAP config for Kolab 3 Patch2: ldapkio-kolab3.diff +# PATCH-FIX-UPSTREAM Fixed-refcounting-in-ETM-and-Monitor.patch -- kde#312460 +Patch100: Fixed-refcounting-in-ETM-and-Monitor.patch BuildRequires: boost-devel BuildRequires: cyrus-sasl-devel BuildRequires: fdupes BuildRequires: gpgme-devel -BuildRequires: libakonadiprotocolinternals-devel >= 1.8.0 +BuildRequires: libakonadiprotocolinternals-devel >= 1.10.45 BuildRequires: libassuan-devel BuildRequires: libkde4-devel BuildRequires: libprison-devel @@ -61,6 +63,7 @@ %setup -q -n kdepimlibs-%{version} %patch1 %patch2 +%patch100 -p1 %build %cmake_kde4 -d build @@ -150,6 +153,8 @@ %{_kde4_libdir}/libakonadi-kmime.so.* %{_kde4_libdir}/libakonadi-notes.so.* %{_kde4_libdir}/libakonadi-socialutils.so.* +%{_kde4_libdir}/libakonadi-xml.so.* +%{_kde4_bindir}/akonadi2xml %package -n libkdepimlibs4-devel Summary: KDE PIM Libraries: Build Environment @@ -193,6 +198,7 @@ %{_kde4_libdir}/libakonadi-kmime.so %{_kde4_libdir}/libakonadi-notes.so %{_kde4_libdir}/libakonadi-socialutils.so +%{_kde4_libdir}/libakonadi-xml.so %{_kde4_libdir}/libgpgme++-pthread.so %{_kde4_libdir}/libgpgme++.so %{_kde4_libdir}/libkabc.so ++++++ Fixed-refcounting-in-ETM-and-Monitor.patch ++++++
From f32842adb2d58e90f96601e18104586350527a88 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf <chrigi_1@fastmail.fm> Date: Wed, 6 Nov 2013 12:30:18 +0100 Subject: [PATCH 1/1] Fixed refcounting in ETM and Monitor
This is a combination of several commits in order to fix the buffering in the ETM. In particular it incorporates the following changes: 1. Fixed fetching of items that exited the buffer after being referenced. After a collection exits the buffer after being referenced, the monitor no longer emits updates for this collection. It is therefore necessary for the ETM to refetch the items to get missing updates. 2. (regarding the removal of the MAXITEMS limit) Don't keep outdated copies of items. A collection is purged if reference counting is used and a collection exits the buffer after being referenced. By not purging the items, it becomes possile that we miss updates, and when refetching the collection because it's referenced again, we don't emit change notifications because the items were in the model already. Since we anyways have to fetch all items, we can as well purge all items. Alternatives: * compare revisions and emit change notifications if necessary in itemsFetched * Still emit notifications in the monitor for modifications only 3. Only buffer a collection after the refcount reaches zero. Before, a collection that was dereffe'd at least once would already be buffered (although the refcount is still >0), resulting in the buffer being occupied by reffe'd collections (which is pointless). BUG: 312460 REVIEW: 113680 FIXED-IN: 4.11.4 (cherry picked from commit af4cb1739873d7b95c1b44a23bb06440d0ecb96c) Conflicts: akonadi/tests/CMakeLists.txt --- akonadi/entitytreemodel_p.cpp | 22 ++-- akonadi/monitor_p.cpp | 29 ++++-- akonadi/monitor_p.h | 13 +++ akonadi/tests/lazypopulationtest.cpp | 188 +++++++++++++++++++++++++++++++++++ 4 files changed, 231 insertions(+), 21 deletions(-) create mode 100644 akonadi/tests/lazypopulationtest.cpp diff --git a/akonadi/entitytreemodel_p.cpp b/akonadi/entitytreemodel_p.cpp index d705f53..e156460 100644 --- a/akonadi/entitytreemodel_p.cpp +++ b/akonadi/entitytreemodel_p.cpp @@ -1569,20 +1569,9 @@ void EntityTreeModelPrivate::ref( Collection::Id id ) bool EntityTreeModelPrivate::shouldPurge( Collection::Id id ) { // reference counted collections should never be purged - // they first have to be deref'ed until they reach 0 - if ( m_monitor->d_ptr->refCountMap.contains( id ) ) { - return false; - } - - // if the collection is buffered, keep it - if ( m_monitor->d_ptr->m_buffer.isBuffered( id ) ) { - return false; - } - - static const int MAXITEMS = 10000; - - // if we do not exceed the maximum items limit, keep it - if ( m_items.size() < MAXITEMS ) { + // they first have to be deref'ed until they reach 0. + // if the collection is buffered, keep it. + if ( m_monitor->d_ptr->isMonitored( id ) ) { return false; } @@ -1902,6 +1891,11 @@ bool EntityTreeModelPrivate::canFetchMore( const QModelIndex & parent ) const return false; } + // If the collection is no longer monitored by the monitor we have to refetch + if ( !m_monitor->d_ptr->isMonitored( colId ) ) { + return true; + } + // Collections which contain no items at all can't contain more if ( m_collectionsWithoutItems.contains( colId ) ) { return false; diff --git a/akonadi/monitor_p.cpp b/akonadi/monitor_p.cpp index fef3eab..0e2b988 100644 --- a/akonadi/monitor_p.cpp +++ b/akonadi/monitor_p.cpp @@ -169,15 +169,16 @@ bool MonitorPrivate::isLazilyIgnored( const NotificationMessageV2 & msg, bool al || ( op == NotificationMessageV2::Link ) || ( op == NotificationMessageV2::Unlink ) ) { - if ( refCountMap.contains( parentCollectionId ) || m_buffer.isBuffered( parentCollectionId ) ) + if ( isMonitored( parentCollectionId ) ) { return false; + } } if ( op == NotificationMessageV2::Move ) { - if ( !refCountMap.contains( parentCollectionId ) && !m_buffer.isBuffered( parentCollectionId ) ) - if ( !refCountMap.contains( msg.parentDestCollection() ) && !m_buffer.isBuffered( msg.parentDestCollection() ) ) - return true; + if ( !isMonitored( parentCollectionId ) && !isMonitored( msg.parentDestCollection() ) ) { + return true; + } // We can't ignore the move. It must be transformed later into a removal or insertion. return false; } @@ -489,8 +490,8 @@ int MonitorPrivate::translateAndCompress( QQueue<NotificationMessageV2> ¬ific bool destWatched = false; if ( useRefCounting && msg.type() == NotificationMessageV2::Items ) { - sourceWatched = refCountMap.contains( msg.parentCollection() ) || m_buffer.isBuffered( msg.parentCollection() ); - destWatched = refCountMap.contains( msg.parentDestCollection() ) || m_buffer.isBuffered( msg.parentDestCollection() ); + sourceWatched = isMonitored( msg.parentCollection() ); + destWatched = isMonitored( msg.parentDestCollection() ); } else { if ( !resources.isEmpty() ) { sourceWatched = resources.contains( msg.resource() ); @@ -906,8 +907,9 @@ Akonadi::Collection::Id MonitorPrivate::deref( Collection::Id id ) if ( --refCountMap[ id ] == 0 ) { refCountMap.remove( id ); + return m_buffer.buffer( id ); } - return m_buffer.buffer( id ); + return -1; } void MonitorPrivate::PurgeBuffer::purge( Collection::Id id ) @@ -932,6 +934,19 @@ Akonadi::Collection::Id MonitorPrivate::PurgeBuffer::buffer( Collection::Id id ) return bumpedId; } +int MonitorPrivate::PurgeBuffer::buffersize() +{ + return MAXBUFFERSIZE; +} + +bool MonitorPrivate::isMonitored( Entity::Id colId ) const +{ + if ( !useRefCounting ) { + return true; + } + return refCountMap.contains( colId ) || m_buffer.isBuffered( colId ); +} + void MonitorPrivate::notifyCollectionStatisticsWatchers(Entity::Id collection, const QByteArray& resource) { if ( collection > 0 && (monitorAll || isCollectionMonitored( collection ) || resources.contains( resource ) ) ) { recentlyChangedCollections.insert( collection ); diff --git a/akonadi/monitor_p.h b/akonadi/monitor_p.h index 1a1c983..d402381 100644 --- a/akonadi/monitor_p.h +++ b/akonadi/monitor_p.h @@ -196,6 +196,8 @@ class AKONADI_TESTS_EXPORT MonitorPrivate return m_buffer.contains( id ); } + static int buffersize(); + private: QQueue<Collection::Id> m_buffer; } m_buffer; @@ -205,6 +207,17 @@ class AKONADI_TESTS_EXPORT MonitorPrivate void ref( Collection::Id id ); Collection::Id deref( Collection::Id id ); + /** + * Returns true if the collection is monitored by monitor. + * + * A collection is always monitored if useRefCounting is false. + * If ref counting is used, the collection is only monitored, + * if the collection is either in refCountMap or m_buffer. + * If ref counting is used and the collection is not in refCountMap or m_buffer, + * no updates for the contained items are emitted, because they are lazily ignored. + */ + bool isMonitored( Collection::Id colId ) const; + private: // collections that need a statistics update QSet<Collection::Id> recentlyChangedCollections; -- 1.8.4.3 ++++++ kdepimlibs-4.11.2.tar.xz -> kdepimlibs-4.11.90.tar.xz ++++++ ++++ 47703 lines of diff (skipped) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de