[ovs-dev] [PATCH v2 6/8] ovsdb-idl: Add comment.

Ben Pfaff blp at ovn.org
Wed Dec 2 06:23:39 UTC 2020


Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 lib/ovsdb-idl.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 5502fdab8644..e1013da86c56 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -617,6 +617,14 @@ ovsdb_idl_destroy(struct ovsdb_idl *idl)
     }
 }
 
+/* By default, or if 'leader_only' is true, when 'idl' connects to a clustered
+ * database, the IDl will avoid servers other than the cluster leader. This
+ * ensures that any data that it reads and reports is up-to-date.  If
+ * 'leader_only' is false, the IDL will accept any server in the cluster, which
+ * means that for read-only transactions it can report and act on stale data
+ * (transactions that modify the database are always serialized even with false
+ * 'leader_only').  Refer to Understanding Cluster Consistency in ovsdb(7) for
+ * more information. */
 void
 ovsdb_idl_set_leader_only(struct ovsdb_idl *idl, bool leader_only)
 {
-- 
2.28.0



More information about the dev mailing list