summaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb.h
diff options
context:
space:
mode:
authorHan Zhou <hzhou8@ebay.com>2019-02-28 09:15:17 -0800
committerBen Pfaff <blp@ovn.org>2019-02-28 10:26:15 -0800
commit695e815027945cbefe3619fc3fc0c93942a1beb8 (patch)
tree0a772ea4246a0a55830c76cb82741d2f05ffb9f6 /ovsdb/ovsdb.h
parent222bed54cd97da30dc2d6c7da36a4f1c3e98adbf (diff)
downloadopenvswitch-695e815027945cbefe3619fc3fc0c93942a1beb8.tar.gz
ovsdb-server: Transaction history tracking.
Maintaining last N (n = 100) transactions in memory, which will be used for future patches for generating monitor data from any point in this N transactions. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/ovsdb.h')
-rw-r--r--ovsdb/ovsdb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ovsdb/ovsdb.h b/ovsdb/ovsdb.h
index d96b1c206..32e533316 100644
--- a/ovsdb/ovsdb.h
+++ b/ovsdb/ovsdb.h
@@ -67,6 +67,11 @@ bool ovsdb_parse_version(const char *, struct ovsdb_version *);
bool ovsdb_is_valid_version(const char *);
/* Database. */
+struct ovsdb_txn_history_node {
+ struct ovs_list node; /* Element in struct ovsdb's txn_history list */
+ struct ovsdb_txn *txn;
+};
+
struct ovsdb {
char *name;
struct ovsdb_schema *schema;
@@ -80,6 +85,11 @@ struct ovsdb {
bool run_triggers;
struct ovsdb_table *rbac_role;
+
+ /* History trasanctions for incremental monitor transfer. */
+ bool need_txn_history; /* Need to maintain history of transactions. */
+ unsigned int n_txn_history; /* Current number of history transactions. */
+ struct ovs_list txn_history; /* Contains "struct ovsdb_txn_history_node. */
};
struct ovsdb *ovsdb_create(struct ovsdb_schema *, struct ovsdb_storage *);