Comment 5 for bug 1909008

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

Neutron service "revisions" is checking the OVO revision number any time a transaction is done in the DB. When OVN backend is used, more than one DB transaction is done to the DB with the same session.

Because of the transaction constraint (OVO standard attributes revision number), the specific requested OVO (in this case a network register) is retrieved from the DB context session. If this OVO is not present, a query to the DB is done [1].

When the network is updated, the revision number is updated too. During the second DB transaction, the network OVO (not present in the session) is retrieved from the DB but at this time the OVO revision number is +1 compared to the requested revision number.

A possible proposed solution [2] is to check the transaction constraint only once and the discard it. This proposal is valid because the transaction constraint refers only to a single register. If the constraint is validated once, there is no need to recheck it again.

Regards.

[1]https://github.com/openstack/neutron/blob/b2389a31a0871e22244232e0db9aba395cb35b49/neutron/services/revisions/revision_plugin.py#L241-L251
[2]https://review.opendev.org/c/openstack/neutron/+/769390