Bug 962560 - Search query "sortby" return some wrongly sorted results
Summary: Search query "sortby" return some wrongly sorted results
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Eli Mesika
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks: 1019461
TreeView+ depends on / blocked
 
Reported: 2013-05-13 21:07 UTC by Tomas Von Veschler
Modified: 2016-02-10 19:32 UTC (History)
9 users (show)

Fixed In Version: is10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of the manager showing the problem (223.21 KB, image/png)
2013-05-13 21:07 UTC, Tomas Von Veschler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 17829 0 None None None Never
oVirt gerrit 18394 0 None None None Never

Description Tomas Von Veschler 2013-05-13 21:07:47 UTC
Created attachment 747446 [details]
Screenshot of the manager showing the problem

Description of problem:

At the admin portal use the following search string:

Vms: sortby cpu_usage desc 

Top 2 results are powered off VMs with 0% CPU usage (see attached screenshot). They shouldn't be on top.

Version-Release number of selected component (if applicable):

3.1.0-50.el6ev

How reproducible:

Always

Additional info:

RHEV-M API is also affected when using:

/api/vms?search=sortby+cpu_usage+desc

Comment 1 Eli Mesika 2013-05-14 00:14:56 UTC
This is the ORDER BY Syntax :

    ORDER BY sort_expression1 [ASC | DESC] [NULLS { FIRST | LAST }]
             [, sort_expression2 [ASC | DESC] [NULLS { FIRST | LAST }] ...]

The NULLS FIRST and NULLS LAST options can be used to determine whether nulls appear before or after non-null values in the sort ordering. By default, null values sort as if larger than any non-null value; that is, NULLS FIRST is the default for DESC order, and NULLS LAST otherwise.

Taking the bug

Comment 4 Eli Mesika 2013-08-12 12:58:01 UTC
fixed in commit : c2a2d65

Comment 5 Ondra Machacek 2013-09-03 10:09:44 UTC
Verified is12.
Vms are correctly sorted by cpu usage.

Comment 6 Itamar Heim 2014-01-21 22:23:24 UTC
Closing - RHEV 3.3 Released

Comment 7 Itamar Heim 2014-01-21 22:24:30 UTC
Closing - RHEV 3.3 Released

Comment 8 Itamar Heim 2014-01-21 22:28:05 UTC
Closing - RHEV 3.3 Released


Note You need to log in before you can comment on or make changes to this bug.