← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2024447] Re: [OVN] "_load_hash_ring" is couting the hash righ nodes without opening a DB txn

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/886457
Committed: https://opendev.org/openstack/neutron/commit/0c66dfaed8e1ec00726c3e484e69174779678abd
Submitter: "Zuul (22348)"
Branch:    master

commit 0c66dfaed8e1ec00726c3e484e69174779678abd
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Tue Jun 20 10:22:14 2023 +0000

    [OVN] The all() and count() methods should be inside a DB txn
    
    The ``ovn_hash_ring_db`` methods ``get_active_nodes`` and
    ``count_offline_nodes`` are sending SQL requests that should be issued
    from inside a READER context.
    
    Closes-Bug: #2024447
    Change-Id: If06c372a9d5cb1dc1ec1af768abb61f52c2c5abd


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2024447

Title:
  [OVN] "_load_hash_ring" is couting the hash righ nodes without opening
  a DB txn

Status in neutron:
  Fix Released

Bug description:
  In [1], we are accessing to the DB calling "count_offline_nodes". This
  call is issuing a DB request without opening a txn (reader context,
  for example).

  The methods "get_active_nodes" and "count_offline_nodes" are calling
  query.all() and query.count() outside the reader context that is
  created in "_get_nodes_query".

  [1]https://review.opendev.org/c/openstack/neutron/+/886005/2/neutron/common/ovn/hash_ring_manager.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2024447/+subscriptions



References