Bug 260007 - Many D-Bus signals emitted whenever mailbox content or state changes
Summary: Many D-Bus signals emitted whenever mailbox content or state changes
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 1.4.80
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 22:57 UTC by Thiago Macieira
Modified: 2016-09-24 21:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Macieira 2010-12-15 22:57:32 UTC
Version:           1.4.80 (using Devel) 
OS:                Linux

Whenever the state of any mail in a mailbox changes, the Akonadi server blurts out a bunch of apparently-identical signals.

Reproducible: Always

Steps to Reproduce:
1. Find a mail folder in KMail2 with one unread email
2. Start dbus-monitor (optional argument for filtering: interface=org.freedesktop.Akonadi.NotificationSource)
3. Click on the unread email.

Actual Results:  
A lot of signals are emitted (14 in my case, paste below)

Expected Results:  
Not that many signals are emitted.

OS: Linux (i686) release 2.6.35.6-desktop-1mnb
Compiler: gcc

Some of the paths mentioned in the dump below refer to applications no longer running, like akonadiconsole.

dbus-monitor dump:signal sender=org.freedesktop.DBus -> dest=:1.588 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.588"


signal sender=:1.312 -> dest=(null destination) serial=25085 path=/subscriber/akonadi_nepomuk_contact_feeder; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25086 path=/subscriber/akonadi_maildispatcher_agent; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25087 path=/subscriber/plasma_desktop; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25088 path=/subscriber/akonadi_imap_resource_1; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25089 path=/subscriber/akonadi_nepomuk_email_feeder; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25090 path=/subscriber/AkonadiAgentServer; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25091 path=/subscriber/akonadi_imap_resource_2; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25092 path=/subscriber/akonadi_imap_resource_13; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25093 path=/subscriber/akonadi_nepomuk_calendar_feeder; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25094 path=/subscriber/akonadi_imap_resource_6; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25095 path=/subscriber/korgac; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25096 path=/subscriber/akonadi_mixedmaildir_resource_0; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25097 path=/subscriber/kontact; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
signal sender=:1.312 -> dest=(null destination) serial=25098 path=/subscriber/akonadiconsole; interface=org.freedesktop.Akonadi.NotificationSource; member=notify
   array [
      struct {
         array of bytes "kontact-1719559948"
         int32 2
         int32 2
         int64 48111
         string "16411"
         array of bytes "akonadi_imap_resource_6"
         int64 235
         int64 -1
         string "message/rfc822"
         array [
            string "FLAGS"
            string "ATR:MDNStateAttribute"
         ]
      }
   ]
Comment 1 Daniel Vrátil 2013-08-28 14:16:15 UTC
NotifcationSource represents a client subscribed to Akonadi notifcation. For server to be able to notify all subscribers, it has to emit the signal on every each one of them. 

This has been notably improved in current git master as every subscriber can tell the server what kind of notifications it is interested in so Akonadi will send the notification only to relevant subscribers.

Finally, this will be completely solved once server-side change recording is in place and notifications about changes are delivered to clients via socket rather then DBus.
Comment 2 Denis Kurz 2016-09-24 20:33:57 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 3 Thiago Macieira 2016-09-24 21:23:41 UTC
Problem seems to be fone