SAWarning contradiction IN-predicate on "instances.uuid"

Bug #1383617 reported by Attila Fazekas on 2014-10-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Low
Joe Gordon
Juno
Undecided
Unassigned

Bug Description

/usr/lib64/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:35: SAWarning: The IN-predicate on "instances.uuid" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.

The above warning reported in the n-cond (or n-cpu) log when using SQLAlchemy 0.9.8.

The system doing an invain query at the end.

The warning generated by this code part:
https://github.com/openstack/nova/blob/9fd059b938a2acca8bf5d58989c78d834fbb0ad8/nova/compute/manager.py#L696
driver_uuids can be an empty list. In this case the sql query is not necessary.

Joe Gordon (jogo) on 2014-10-21
Changed in nova:
status: New → Confirmed
importance: Undecided → Low

Fix proposed to branch: master
Review: https://review.openstack.org/130069

Changed in nova:
assignee: nobody → Joe Gordon (jogo)
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/130069
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=150428f76e6149abb21d5264142673bc4961ec75
Submitter: Jenkins
Branch: master

commit 150428f76e6149abb21d5264142673bc4961ec75
Author: Joe Gordon <email address hidden>
Date: Tue Oct 21 16:46:19 2014 -0700

    Don't make a no-op DB call

    drivers_uuid can be empty, but we are still doing a DB call. This is causing
    a sqlalchemy SAWarning.

    SAWarning: The IN-predicate on "instances.uuid" was invoked with an
    empty sequence. This results in a contradiction, which nonetheless can
    be expensive to evaluate. Consider alternative strategies for improved
    performance.

    Change-Id: Ib8c9b85e84800c9e2ddcdf204851f1b51101926c
    Closes-Bug: #1383617

Changed in nova:
status: In Progress → Fix Committed
Dave Walker (davewalker) on 2014-11-28
tags: added: juno-backport-potential
Thierry Carrez (ttx) on 2014-12-18
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/134740
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=699b46799fe408bab1f23c108c2e9887638ec5b0
Submitter: Jenkins
Branch: stable/juno

commit 699b46799fe408bab1f23c108c2e9887638ec5b0
Author: Joe Gordon <email address hidden>
Date: Tue Oct 21 16:46:19 2014 -0700

    Don't make a no-op DB call

    drivers_uuid can be empty, but we are still doing a DB call. This is causing
    a sqlalchemy SAWarning.

    SAWarning: The IN-predicate on "instances.uuid" was invoked with an
    empty sequence. This results in a contradiction, which nonetheless can
    be expensive to evaluate. Consider alternative strategies for improved
    performance.

    Conflicts:
            nova/tests/unit/compute/test_compute_mgr.py

    Change-Id: Ib8c9b85e84800c9e2ddcdf204851f1b51101926c
    Closes-Bug: #1383617
    (cherry picked from commit 150428f76e6149abb21d5264142673bc4961ec75)

tags: added: in-stable-juno
Thierry Carrez (ttx) on 2015-04-30
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers