Zeitgeist engine tells that an event has been inserted even though it has been blocked by an extension

Bug #693094 reported by Manish Sinha (मनीष सिन्हा) on 2010-12-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Wishlist
Seif Lotfy

Bug Description

I was working on blacklist when I noticed that even though the event insertion has been blocked by an extension, the engine still reports that the event has been inserted

Here is the output at the daemon
[2010-12-21 22:24:21,122] - ERROR - zeitgeist.engine - error while inserting 'Event([dbus.Array([9176, dbus.String(u'1292949791179'), dbus.String(u''), dbus.String(u''), dbus.String(u'application://foo.desktop')], signature=dbus.Signature('s')), [Subject([dbus.String(u''), dbus.String(u''), dbus.String(u''), dbus.String(u''), dbus.String(u''), dbus.String(u''), dbus.String(u'')])], dbus.Array([], signature=dbus.Signature('y'))])'
Traceback (most recent call last):
  File "/home/manish/code/zeitgeist/zeitgeist/../_zeitgeist/engine/main.py", line 484, in _insert_event_without_error
    return self._insert_event(event, sender)
  File "/home/manish/code/zeitgeist/zeitgeist/../_zeitgeist/engine/main.py", line 503, in _insert_event
    raise AssertionError("Inserting of event was blocked by an extension")
AssertionError: Inserting of event was blocked by an extension
[2010-12-21 22:24:21,126] - DEBUG - zeitgeist.engine - Inserted 1 events in 0.001179s

The section in _zeitgeist/engine/main.py responsible for this is
http://paste.ubuntu.com/546316/
The AssertionError is raised on line 29 which is caught at line 11, but at line 3 and line 4, there is no way to check that the the event was actually inserted

I was recommend some way to track how many events have been inserted and how many have been blocked

Related branches

Yup. Or rename the message so it's clear the the query was inserting X
events but not all of them may have been successful (eg "Requested
insertion of X events" or "Processed X events").

This message is just there for the timing information and users aren't
supposed to care about it.

Yes. It is for debug information. Still it is good to have the exact details when we want the exact details when debugging

Seif Lotfy (seif) on 2010-12-23
Changed in zeitgeist:
assignee: nobody → Seif Lotfy (seif)
status: New → Fix Committed
status: Fix Committed → In Progress
milestone: none → 0.7.0
Seif Lotfy (seif) on 2010-12-28
Changed in zeitgeist:
status: In Progress → Fix Committed
importance: Undecided → Wishlist
Seif Lotfy (seif) on 2011-01-18
Changed in zeitgeist:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers