On 7/22/21 7:16 PM, [email protected] wrote:
> From: Anton Ivanov <[email protected]>
> 
> Set a soft time limit of "raft election timer"/2 on ovsdb
> processing.
> 
> This improves behaviour in large heavily loaded clusters.
> While it cannot fully eliminate spurious raft elections
> under heavy load, it significantly decreases their number.
> 
> Processing is (to the extent possible) restarted where it
> stopped on the previous iteration to ensure that sessions
> towards the tail of the session list are not starved.
> 
> Signed-off-by: Anton Ivanov <[email protected]>

Hi Anton,

There's another comment I made on v4 that was missed in v6.

[...]

> diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
> index 0b3d2bb71..3fcedf617 100644
> --- a/ovsdb/ovsdb-server.c
> +++ b/ovsdb/ovsdb-server.c
> @@ -216,7 +216,28 @@ main_loop(struct server_config *config,
>              reconfigure_remotes(jsonrpc, all_dbs, remotes),
>              &remotes_error);
>          report_error_if_changed(reconfigure_ssl(all_dbs), &ssl_error);
> -        ovsdb_jsonrpc_server_run(jsonrpc);
> +
> +        /* Figure out current processing time limit. */
> +

Please remove this empty line.

As mentioned on the v4 patch, this can be simplified as follows:

/* Figure out current processing time limit. */
uint64_t limit = UINT64_MAX;
SHASH_FOR_EACH (node, all_dbs) {
    struct db *db = node->data;
    uint64_t db_limit;

    db_limit = ovsdb_storage_max_processing_time(db->db->storage));
    limit = MIN(db_limit, limit);
}
if (ovs_replay_is_active()) {
    limit = UINT64_MAX;
}

> +        bool first_db = true;
> +        uint64_t limit = UINT64_MAX;
> +        SHASH_FOR_EACH (node, all_dbs) {
> +            struct db *db = node->data;
> +            uint64_t db_limit;
> +
> +            db_limit = ovsdb_storage_max_processing_time(db->db->storage);
> +            if (first_db) {
> +                /* reset the limit */
> +                limit = db_limit;
> +                first_db = false;
> +            }
> +            limit = MIN(db_limit, limit);
> +        }
> +        if (ovs_replay_is_active()) {
> +            limit = UINT64_MAX;
> +        }
> +
> +        ovsdb_jsonrpc_server_run(jsonrpc, limit);
>  

Regards,
Dumitru

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to