[ovs-dev] [PATCH 5/5] jsonrpc: Disable inactivity probes if replay engine is active.
Ilya Maximets
i.maximets at ovn.org
Tue Jun 30 01:24:35 UTC 2020
Current version of replay engine doesn't handle time-based internal
events that results in stream send/receive. Disabling jsonrpc inactivity
probes for now to not block process waiting for probe being sent.
The proper solution whould be to implement correct record/replay
of time, probably, by recording time and using the time warping.
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
---
lib/jsonrpc.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c
index ed748dbde..0e42751b0 100644
--- a/lib/jsonrpc.c
+++ b/lib/jsonrpc.c
@@ -848,7 +848,7 @@ jsonrpc_session_open_multiple(const struct svec *remotes, bool retry)
reconnect_set_backoff(s->reconnect, INT_MAX, INT_MAX);
}
- if (!stream_or_pstream_needs_probes(name)) {
+ if (!stream_or_pstream_needs_probes(name) || stream_replay_is_active()) {
reconnect_set_probe_interval(s->reconnect, 0);
}
@@ -873,6 +873,11 @@ jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc, uint8_t dscp)
reconnect_set_quiet(s->reconnect, true);
reconnect_set_name(s->reconnect, jsonrpc_get_name(jsonrpc));
reconnect_set_max_tries(s->reconnect, 0);
+
+ if (stream_replay_is_active()) {
+ reconnect_set_probe_interval(s->reconnect, 0);
+ }
+
reconnect_connected(s->reconnect, time_msec());
s->dscp = dscp;
s->rpc = jsonrpc;
@@ -1231,6 +1236,9 @@ void
jsonrpc_session_set_probe_interval(struct jsonrpc_session *s,
int probe_interval)
{
+ if (stream_replay_is_active()) {
+ return;
+ }
reconnect_set_probe_interval(s->reconnect, probe_interval);
}
--
2.25.4
More information about the dev
mailing list