diff options
author | Terry Wilson <twilson@redhat.com> | 2021-03-09 14:34:16 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2021-03-15 16:37:20 +0100 |
commit | 64b8c1d9ade2a9abc09a6472af5badddd600a3f8 (patch) | |
tree | a5210b544ace720aec19c5c355f02497b99577bc /include/linux | |
parent | cdaa7e0fd60d94f95925f1a498f61698675deacc (diff) | |
download | openvswitch-64b8c1d9ade2a9abc09a6472af5badddd600a3f8.tar.gz |
python: Send notifications after the transaction ends.
The Python IDL notification mechanism was sending a notification
for each processed update in a transaction as it was processed.
This causes issues with multi-row changes that contain references
to each other.
For example, if a Logical_Router_Port is created along with a
Gateway_Chassis, and the LRP.gateway_chassis set to that GC, then
when the notify() passes the CREATE event for the LRP, the GC will
not yet have been processed, so __getattr__ when _uuid_to_row fails
to find the GC, will return the default value for LRP.gateway_chassis
which is [].
This patch has the process_update methods return the notifications
that would be produced when a row changes, so they can be queued
and sent after all rows have been processed.
Fixes: d7d417fcddf9 ("Allow subclasses of Idl to define a notification hook")
Signed-off-by: Terry Wilson <twilson@redhat.com>
Acked-by: Brian Haley <haleyb.dev@gmail.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Tested-by: Flavio Fernandes <flavio@flaviof.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions