The counter for the number of atoms has to be re-set to the number from
the new database, otherwise the value will be incorrect. For example,
this is causing the atom counter doubling after online conversion of
a clustered database.
Miscounting may also lead to increased memory consumption by the
transaction history or otherwise too aggressive transaction history
sweep.
Fixes: 317b1bfd7dd3 ("ovsdb: Don't let transaction history grow larger than the
database.")
Signed-off-by: Ilya Maximets <[email protected]>
---
ovsdb/ovsdb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ovsdb/ovsdb.c b/ovsdb/ovsdb.c
index 11786f376..afec96264 100644
--- a/ovsdb/ovsdb.c
+++ b/ovsdb/ovsdb.c
@@ -715,5 +715,8 @@ ovsdb_replace(struct ovsdb *dst, struct ovsdb *src)
dst->rbac_role = ovsdb_get_table(dst, "RBAC_Role");
+ /* Get statistics from the new database. */
+ dst->n_atoms = src->n_atoms;
+
ovsdb_destroy(src);
}
--
2.38.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev