diff mbox series

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

Message ID 20201202062341.1367060-7-blp@ovn.org
State Superseded
Headers show
Series Refactor OVSDB IDL into two layers | expand

Commit Message

Ben Pfaff Dec. 2, 2020, 6:23 a.m. UTC
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/ovsdb-idl.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

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)
 {