ovsdb-idl: Improve ovsdb_idl_add_table() comment.
authorAymerich, Edward <edward.aymerich@hpe.com>
Fri, 27 Nov 2015 16:57:07 +0000 (16:57 +0000)
committerBen Pfaff <blp@ovn.org>
Mon, 30 Nov 2015 18:53:15 +0000 (10:53 -0800)
The new comment reflects with more clarity what ovsdb_idl_add_table() does.
Previous comment could be misunderstood, leading to believe that this function
replicates all columns on IDL. Hopefully this fix clarifies that columns are
not replicated, just minimal data for reference integrity is replicated.
A comment in ovsdb_idl_table_class is also modified to better reflect this
behaviour.

Signed-off-by: Edward Aymerich <edward.aymerich@hpe.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
AUTHORS
lib/ovsdb-idl-provider.h
lib/ovsdb-idl.c

diff --git a/AUTHORS b/AUTHORS
index ae4a332..d5bb96a 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -58,6 +58,7 @@ Duffie Cooley           dcooley@nicira.com
 Ed Maste                emaste@freebsd.org
 Ed Swierk               eswierk@skyportsystems.com
 Edouard Bourguignon     madko@linuxed.net
+Aymerich Edward         edward.aymerich@hpe.com
 Edward Tomasz NapieraƂa trasz@freebsd.org
 Eitan Eliahu            eliahue@vmware.com
 Eohyung Lee             liquidnuker@gmail.com
index 3dddf69..099535e 100644 (file)
@@ -61,7 +61,8 @@ struct ovsdb_idl_table_class {
 struct ovsdb_idl_table {
     const struct ovsdb_idl_table_class *class;
     unsigned char *modes;    /* OVSDB_IDL_* bitmasks, indexed by column. */
-    bool need_table;         /* Monitor table even if no columns? */
+    bool need_table;         /* Monitor table even if no columns are selected
+                              * for replication. */
     struct shash columns;    /* Contains "const struct ovsdb_idl_column *"s. */
     struct hmap rows;        /* Contains "struct ovsdb_idl_row"s. */
     struct ovsdb_idl *idl;   /* Containing idl. */
index 588582a..8f75bf0 100644 (file)
@@ -557,11 +557,13 @@ ovsdb_idl_add_column(struct ovsdb_idl *idl,
 }
 
 /* Ensures that the table with class 'tc' will be replicated on 'idl' even if
- * no columns are selected for replication.  This can be useful because it
- * allows 'idl' to keep track of what rows in the table actually exist, which
- * in turn allows columns that reference the table to have accurate contents.
- * (The IDL presents the database with references to rows that do not exist
- * removed.)
+ * no columns are selected for replication. Just the necessary data for table
+ * references will be replicated (the UUID of the rows, for instance), any
+ * columns not selected for replication will remain unreplicated.
+ * This can be useful because it allows 'idl' to keep track of what rows in the
+ * table actually exist, which in turn allows columns that reference the table
+ * to have accurate contents. (The IDL presents the database with references to
+ * rows that do not exist removed.)
  *
  * This function is only useful if 'monitor_everything_by_default' was false in
  * the call to ovsdb_idl_create().  This function should be called between