On 4/21/26 4:02 PM, Felix Huettner via dev wrote:
> Previously the transaction history was hard limited to 100 entries.
> However in fast changing environments (e.g. with 20 transactions/sec)
> this means that transactions are only in the history for a few seconds.
> If now a client reconnects and tries to use monitor_cond_since it has
> only a short timeframe where this will reliably work.
> 
> We make the history limit configurable here so that use can choose the
> speed vs memory tradeoff as needed.
> We still keep the limit based on size of the history, as syncing a
> history larger than the actual database size does not make sense in any
> way.
> 
> Signed-off-by: Felix Huettner <[email protected]>
> ---
> v2->v3: adressed docs and nits as requested by Ilja
> v1->v2: handle setting if the config does not specify the service-model.
> 
>  Documentation/ref/ovsdb.7.rst | 22 +++++++++++++++++++++
>  NEWS                          |  3 +++
>  ovsdb/ovsdb-server.1.in       |  4 ++++
>  ovsdb/ovsdb-server.c          | 27 +++++++++++++++++++++++--
>  ovsdb/ovsdb.h                 |  3 ++-
>  ovsdb/relay.c                 |  4 ++--
>  ovsdb/transaction.c           | 37 +++++++++++++++++++++++++++++------
>  ovsdb/transaction.h           |  5 ++++-
>  tests/ovsdb-server.at         | 25 +++++++++++++++++++++--
>  9 files changed, 116 insertions(+), 14 deletions(-)
> 
> diff --git a/Documentation/ref/ovsdb.7.rst b/Documentation/ref/ovsdb.7.rst
> index cf1ef3736..1c88238c0 100644
> --- a/Documentation/ref/ovsdb.7.rst
> +++ b/Documentation/ref/ovsdb.7.rst
> @@ -624,6 +624,28 @@ above).
>  
>  Open vSwitch 2.16 introduced support for relay service model.
>  
> +Client Monitors
> +===============
> +
> +Clients requesting monitors using ``"monitor"`` or ``"monitor_cond"`` will
> +generally receive an initial dump of all of their relevant data when the
> +montior is started. As changes are submitted to the ovsdb it will send 
> updates
> +to the clients. If a client where to reconnect to a ovsdb it would receive a
> +full initial dump again.
> +
> +In case the client uses ``"monitor_cond_since"`` it can improve on this
> +reconnect behaviour by providing the ovsdb server with the last known update
> +ID. If the server still has this ID in its history it will respond only with
> +the changes that accumulated since this ID. This feature is only available if
> +the ovsdb server uses the **clustered** service model. It is also available 
> on
> +the **relay** service model if the relay source is a **clustered** service
> +model.
> +
> +The transaction history used for this is limited to the same memory usage as
> +the database itself. In addition it has a limit of 100 entries per default.
> +This can be modified by using ``"transaction-history-limit": 1000`` in the
> +configuration of the database.

Double spaces between sentences.  But also, I think, instead of making the
separate section here, we should extend the exmaples of the clustered and
relay configs in their sections, pointing out that the transaction history
config is optional, give a brief (one short sentence) of what it is and point
to ovsdb-server(1) for more details.  ovsdb-server(1) should have a bit wider
explanation and point to ovsdb-server(7) for the details on monitor_cond_since
extension of the OVSDB JSONRPC protocol.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to