]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make query to quota usage table order preserved
authorwangxiyuan <wangxiyuan@huawei.com>
Thu, 3 Mar 2016 03:37:25 +0000 (11:37 +0800)
committerwangxiyuan <wangxiyuan@huawei.com>
Thu, 3 Mar 2016 03:41:02 +0000 (11:41 +0800)
commit5567797b3a3aece597d06d0f4b05740aa8b56158
tree82e780d9ef75c055afa53bc6eb482e7398baa2fe
parentbd78839974489556da9e0944f6a81c18d47d0c58
Make query to quota usage table order preserved

Currently, the query to quota usage table is not order
preserved. This might cause deadlock in large-scale
deployment: different calls may lock rows in different
order, and deadlock will happen.

This patch adds order_by to the query and make the query
to the table order preserved.

Change-Id: I7c439235f8927d5eb52274a59d0a87ad76879de1
Closes-bug: #1552510
cinder/db/sqlalchemy/api.py