From 36a4bbb13737f91f7b9b2a52388ea6b84a0b7794 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Thu, 9 Dec 2021 13:06:39 +0300 Subject: [PATCH] Minor grammar fix (#384) --- sources/frontend.c | 4 ++-- sources/route.h | 4 ++-- sources/storage.c | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sources/frontend.c b/sources/frontend.c index 5ad15153..84926efd 100644 --- a/sources/frontend.c +++ b/sources/frontend.c @@ -900,7 +900,7 @@ static inline od_frontend_status_t od_frontend_poll_catchup(od_client_t *client, for (int checks = 0; checks < route->rule->catchup_checks; ++checks) { od_dbg_printf_on_dvl_lvl(1, "current cached time %d\n", machine_timeofday_sec()); - uint32_t lag = machine_timeofday_sec() - route->last_heartbit; + uint32_t lag = machine_timeofday_sec() - route->last_heartbeat; if (lag < route->rule->catchup_timeout) { return OD_OK; } @@ -949,7 +949,7 @@ static od_frontend_status_t od_frontend_remote(od_client_t *client) } od_server_t *server = NULL; - int last_heartbit = 0; + int last_heartbeat = 0; for (;;) { for (;;) { diff --git a/sources/route.h b/sources/route.h index eaca922c..1786d9e1 100644 --- a/sources/route.h +++ b/sources/route.h @@ -26,7 +26,7 @@ struct od_route { kiwi_params_lock_t params; int64_t tcp_connections; - int last_heartbit; + int last_heartbeat; machine_channel_t *wait_bus; pthread_mutex_t lock; @@ -40,7 +40,7 @@ static inline void od_route_init(od_route_t *route, bool extra_route_logging) { route->rule = NULL; route->tcp_connections = 0; - route->last_heartbit = 0; + route->last_heartbeat = 0; od_route_id_init(&route->id); od_server_pool_init(&route->server_pool); diff --git a/sources/storage.c b/sources/storage.c index f392b344..3588edde 100644 --- a/sources/storage.c +++ b/sources/storage.c @@ -187,10 +187,10 @@ error: return NOT_OK_RESPONSE; } -static inline int od_router_update_heartbit_cb(od_route_t *route, void **argv) +static inline int od_router_update_heartbeat_cb(od_route_t *route, void **argv) { od_route_lock(route); - route->last_heartbit = argv[0]; + route->last_heartbeat = argv[0]; od_route_unlock(route); return 0; } @@ -224,7 +224,7 @@ void od_storage_watchdog_watch(od_storage_watchdog_t *watchdog) machine_msg_t *msg; - int last_heartbit = 0; + int last_heartbeat = 0; int rc; /* route */ od_router_status_t status; @@ -277,7 +277,7 @@ void od_storage_watchdog_watch(od_storage_watchdog_t *watchdog) msg = od_query_do(server, "watchdog", qry, NULL); if (msg != NULL) { rc = od_storage_watchdog_parse_lag_from_datarow( - msg, &last_heartbit); + msg, &last_heartbeat); machine_msg_free(msg); od_router_close(router, watchdog_client); } else { @@ -294,11 +294,11 @@ void od_storage_watchdog_watch(od_storage_watchdog_t *watchdog) od_debug( &instance->logger, "watchdog", NULL, NULL, - "send heartbit arenda update to routes with value %d", - last_heartbit); - void *argv[] = { last_heartbit }; + "send heartbeat arenda update to routes with value %d", + last_heartbeat); + void *argv[] = { last_heartbeat }; od_router_foreach(router, - od_router_update_heartbit_cb, + od_router_update_heartbeat_cb, argv); break; }