Querying on LeastRecentActor with event templates doesn't work

Bug #641968 reported by Markus Korn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
High
Siegfried Gevatter

Bug Description

Scenario: I would like to know which actor touched a file with uri="home/boo" least recently.

This query should do the job:
>>> template = Event.new_for_values(subject_uri="home/boo")
>>> ids = engine.find_eventids(TimeRange.always(), [template, ], StorageState.Any, 0, ResultType.LeastRecentActor)

However as you can see in the attached script this does always return an empty result. It looks like LeastRecentActor plus any search template is not working.

Revision history for this message
Markus Korn (thekorn) wrote :
Changed in zeitgeist:
status: New → Confirmed
Seif Lotfy (seif)
Changed in zeitgeist:
importance: Undecided → High
milestone: none → 0.5.2
Seif Lotfy (seif)
Changed in zeitgeist:
assignee: nobody → Seif Lotfy (seif)
Seif Lotfy (seif)
summary: - querying on LeastRecentActor for a certain subject_uri is not working
+ querying on LeastRecentActor and MostRecentActor for a certain
+ subject_uri is not working
Changed in zeitgeist:
assignee: Seif Lotfy (seif) → nobody
Seif Lotfy (seif)
Changed in zeitgeist:
status: Confirmed → In Progress
assignee: nobody → Seif Lotfy (seif)
Revision history for this message
Seif Lotfy (seif) wrote : Re: querying on LeastRecentActor and MostRecentActor for a certain subject_uri is not working

IMHO our current understanding of LeastRecentActor is wrong...
Let's assume we have sequential events. (The actors are defined by numbers)

2, 1, 3, 2, 1, 4

So we have 4 different actors (1,2,3,4) and we want to sort them by least recent.
the least recent is not 2 or 1 since they are used again at the end. the least recent is 3

This means LeastRecentActors should return the latest actors sorted ASC:

3, 2, 1, 4

and not

2, 1, 3, 4

MostRecentActors should return the same last 4 files but in reversed sorting:

4, 3, 1, 2

Revision history for this message
Markus Korn (thekorn) wrote :

I'm removing the attached branch, since the initial issue is not fixed by this changes (maybe indirectly=

Changed in zeitgeist:
status: In Progress → Confirmed
summary: - querying on LeastRecentActor and MostRecentActor for a certain
- subject_uri is not working
+ querying on LeastRecentActor for a certain subject_uri is not working
summary: - querying on LeastRecentActor for a certain subject_uri is not working
+ Querying on LeastRecentActor with event templates doesn't work
Revision history for this message
Siegfried Gevatter (rainct) wrote :

Fixed in revision 1607.

I've also added the test case provided by Markus into our test suite.

Changed in zeitgeist:
assignee: Seif Lotfy (seif) → Siegfried Gevatter (rainct)
status: Confirmed → Fix Committed
Changed in zeitgeist:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.