Test for breaking ties in paging is wrong (?)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
justinsb |
Bug Description
In registry/db/api.py we have this code:
if sort_dir == 'desc':
query = query.filter(
else:
query = query.filter(
I think there's a few problems here:
Normally the sort_key_attr is created_at. So the second test will never match, because created_at cannot be < X and == X.
I think this should be:
Further, I think the second test should also be <=, not >, because I think this is supposed to be checking for chronological order (i.e. we don't get 'new' results injected into a previous search) ?
This is related to, but different from Bug #930543. Using the same hack to force the timestamps the same shows up the problems here.
Changed in glance: | |
assignee: | nobody → justinsb (justin-fathomdb) |
Changed in glance: | |
milestone: | none → essex-4 |
importance: | Undecided → High |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-4 → 2012.1 |
Fix proposed to branch: master /review. openstack. org/4045
Review: https:/