]> git.proxmox.com Git - mirror_ovs.git/commit
ovsdb-monitor: Support monitor_cond_since.
authorHan Zhou <hzhou8@ebay.com>
Thu, 28 Feb 2019 17:15:18 +0000 (09:15 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 28 Feb 2019 18:26:18 +0000 (10:26 -0800)
commit9167cb52fa8708ff524be9fc41a8f5ccdfa0a15d
tree2f80a6ffbb23578fb1a512d263e0c735738851c8
parent695e815027945cbefe3619fc3fc0c93942a1beb8
ovsdb-monitor: Support monitor_cond_since.

Support the new monitor method monitor_cond_since so that a client
can request monitoring start from a specific point instead of always
from beginning. This will reduce the cost at scenarios when server
is restarted/failed-over but client still has all existing data. In
these scenarios only new changes (and in most cases no change) needed
to be transfered to client. When ovsdb-server restarted, history
transactions are read from disk file; when ovsdb-server failed over,
history transactions exists already in the memory of the new server.

There are situations that the requested transaction may not be found.
For example, a transaction that is too old and has been discarded
from the maintained history list in memory, or the transactions on
disk has been compacted during ovsdb compaction. In those situations
the server fall backs to transfer all data start from begining.

For more details of the protocol change, see
Documentation/ref/ovsdb-server.7.rst.

This change includes both server side and ovsdb-client side changes
with the new protocol. IDLs using this capability will be added in
future patches.

Now the feature takes effect only for cluster mode of ovsdb-server,
because cluster mode is the only mode that supports unique transcation
uuid today. For other modes, the monitor_cond_since always fall back
to transfer all data with found = false. Support for those modes can
be added in the future.

Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Documentation/ref/ovsdb-server.7.rst
ovsdb/jsonrpc-server.c
ovsdb/monitor.c
ovsdb/monitor.h
ovsdb/ovsdb-client.1.in
ovsdb/ovsdb-client.c
ovsdb/transaction.c
ovsdb/transaction.h
tests/ovsdb-monitor.at