]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Eager load columns in volume_get_active_by_window
authorMichał Dulko <michal.dulko@intel.com>
Fri, 20 Nov 2015 11:36:22 +0000 (12:36 +0100)
committerMichał Dulko <michal.dulko@intel.com>
Sat, 21 Nov 2015 16:17:01 +0000 (17:17 +0100)
commit586727cef755abeb3360f176782c1b1dd680d318
tree9a65802151a0049990656bd456be5b6353c0764c
parent78c16e4f37b46ca8f95463e806cbdf62aa0761b3
Eager load columns in volume_get_active_by_window

All other volume-related methods in db.sqlalchemy.api are eager loading
volume_metadata, volume_admin_metadata (if admin), volume_type,
volume_attachment and consistencygroup. volume_get_active_by_window
wasn't, causing fails because of SQLAlchemy Session being closed when
trying to lazy load volume_metadata. This commit adds missing
options(joinedload()) to this query.

Change-Id: I33ec89d7f1f43aae6010aaa6e12951b7c522b8f0
Closes-Bug: 1517763
Related-Bug: 1501838
cinder/db/sqlalchemy/api.py