switch to reader context

Bug #1859258 reported by zhanghao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
zhanghao

Bug Description

The mtu is already non-nullable, so the writer context can be switched to a reader context.

like this can be removed, and change it.
# NOTE(ihrachys) use writer manager to be able to update mtu
# TODO(ihrachys) remove in Queens when mtu is not nullable
with db_api.CONTEXT_WRITER.using(context):

In addition, redundant reader context can be removed.
def _get_subnet
    # TODO(ihrachys) remove explicit reader usage when subnet OVO switches
    # to engine facade by default
    with db_api.CONTEXT_READER.using(context):

zhanghao (zhanghao2)
Changed in neutron:
assignee: nobody → zhanghao (zhanghao2)
Changed in neutron:
status: New → In Progress
Hongbin Lu (hongbin.lu)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/701909
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=af274fa826fc97c15f9fe9b51a966caa8c5cf2eb
Submitter: Zuul
Branch: master

commit af274fa826fc97c15f9fe9b51a966caa8c5cf2eb
Author: zhanghao <email address hidden>
Date: Tue Jan 7 03:18:12 2020 -0500

    Switch to reader context

    Since the mtu is already non-nullable, the writer context
    can be switched to a reader context. In addition, the redundant
    reader context can be removed.

    Change-Id: I482a3892dee8ee94ab70142cf734f71e766178ed
    Closes-Bug: #1859258

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 16.0.0.0b1

This issue was fixed in the openstack/neutron 16.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.