]> git.proxmox.com Git - mirror_ovs.git/blobdiff - ovsdb/replication.c
ovsdb replication: Provide option to configure probe interval.
[mirror_ovs.git] / ovsdb / replication.c
index 42e27cba058c29b8780f542b4251b6fb6c30a45d..cbbce64dfbf529421960ebf36587d1bb6aba4ef5 100644 (file)
@@ -125,7 +125,7 @@ static struct replication_db *find_db(const char *db_name);
 
 void
 replication_init(const char *sync_from_, const char *exclude_tables,
-                 const struct uuid *server)
+                 const struct uuid *server, int probe_interval)
 {
     free(sync_from);
     sync_from = xstrdup(sync_from_);
@@ -143,6 +143,8 @@ replication_init(const char *sync_from_, const char *exclude_tables,
     session = jsonrpc_session_open(sync_from, true);
     session_seqno = UINT_MAX;
 
+    jsonrpc_session_set_probe_interval(session, probe_interval);
+
     /* Keep a copy of local server uuid.  */
     server_uuid = *server;
 
@@ -979,6 +981,14 @@ is_replication_possible(struct ovsdb_schema *local_db_schema,
     return true;
 }
 
+void
+replication_set_probe_interval(int probe_interval)
+{
+    if (session) {
+        jsonrpc_session_set_probe_interval(session, probe_interval);
+    }
+}
+
 void
 replication_usage(void)
 {