On 7/14/21 3:50 PM, Ilya Maximets wrote:
> New database service model 'relay' that is needed to scale out
> read-mostly database access, e.g. ovn-controller connections to
> OVN_Southbound.
>
> In this service model ovsdb-server connects to existing OVSDB
> server and maintains in-memory copy of the database. It serves
> read-only transactions and monitor requests by its own, but
> forwards write transactions to the relay source.
>
> Key differences from the active-backup replication:
> - support for "write" transactions (next commit).
> - no on-disk storage. (probably, faster operation)
> - support for multiple remotes (connect to the clustered db).
> - doesn't try to keep connection as long as possible, but
> faster reconnects to other remotes to avoid missing updates.
> - No need to know the complete database schema beforehand,
> only the schema name.
> - can be used along with other standalone and clustered databases
> by the same ovsdb-server process. (doesn't turn the whole
> jsonrpc server to read-only mode)
> - supports modern version of monitors (monitor_cond_since),
> because based on ovsdb-cs.
> - could be chained, i.e. multiple relays could be connected
> one to another in a row or in a tree-like form.
> - doesn't increase availability.
> - cannot be converted to other service models or become a main
> active server.
>
> Acked-by: Dumitru Ceara <[email protected]>
> Signed-off-by: Ilya Maximets <[email protected]>
> ---
[...]
> struct ovsdb *ovsdb_create(struct ovsdb_schema *, struct ovsdb_storage *);
> diff --git a/ovsdb/relay.c b/ovsdb/relay.c
> new file mode 100644
> index 000000000..740b34ddf
> --- /dev/null
> +++ b/ovsdb/relay.c
> @@ -0,0 +1,343 @@
[...]
> +
> +static struct ovsdb_error *
> +ovsdb_relay_parse_update__(struct ovsdb *db,
> + const struct ovsdb_cs_db_update *du)
> +{
> + struct ovsdb_error *error = NULL;
> + struct ovsdb_txn *txn;
> +
> + txn = ovsdb_txn_create(db);
> +
> + for (size_t i = 0; i < du->n; i++) {
> + const struct ovsdb_cs_table_update *tu = &du->table_updates[i];
> + struct ovsdb_table *table = ovsdb_get_table(db, tu->table_name);
> +
> + if (!table) {
> + error = ovsdb_error("unknown table", "unknown table %s",
Nit: two spaces after '='.
I presume this can be fixed at apply time (and the line below needs to
be reindented then). My ack from v2 stands.
Thanks,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev