[ovs-dev] [PATCH] bridge: Fix race on instant_stats transactions.
Joe Stringer
joestringer at nicira.com
Wed Dec 25 00:19:59 UTC 2013
Commit 7f8f2757f3 ("bridge: Only store instant_stats on device changes")
introduced a race condition where instant stats would sometimes not be
updated to the database. In this case, monitor status reported by
'ovs-appctl bfd/show' would differ from 'ovs-vsctl list int'. This patch
fixes the issue by ensuring that the main thread waits on
connectivity_seqno in instant_stats_wait().
Bug #22136.
Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
vswitchd/bridge.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 6311ff3..f569699 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2253,6 +2253,7 @@ instant_stats_run(void)
static void
instant_stats_wait(void)
{
+ seq_wait(connectivity_seq_get(), connectivity_seqno);
if (instant_txn) {
ovsdb_idl_txn_wait(instant_txn);
} else if (instant_stats_could_have_changed) {
--
1.7.9.5
More information about the dev
mailing list