mirror of https://github.com/yandex/odyssey.git
Fix calculation of latencies (#294)
* Fix calculation of latencies * linter fixes
This commit is contained in:
parent
e3ebd07c02
commit
ee9eb583f1
|
@ -42,9 +42,12 @@ int od_deploy(od_client_t *client, char *context)
|
|||
return -1;
|
||||
|
||||
query_count++;
|
||||
client->server->synced_settings = false;
|
||||
|
||||
od_debug(&instance->logger, context, client, server,
|
||||
"deploy: %s", query);
|
||||
} else {
|
||||
client->server->synced_settings = true;
|
||||
}
|
||||
|
||||
return query_count;
|
||||
|
|
|
@ -710,6 +710,13 @@ static od_frontend_status_t od_frontend_remote_server(od_relay_t *relay,
|
|||
is_ready_for_query = 1;
|
||||
od_backend_ready(server, data, size);
|
||||
|
||||
if (is_deploy)
|
||||
server->deploy_sync--;
|
||||
|
||||
if (!server->synced_settings) {
|
||||
server->synced_settings = true;
|
||||
break;
|
||||
}
|
||||
/* update server stats */
|
||||
int64_t query_time = 0;
|
||||
od_stat_query_end(&route->stats, &server->stats_state,
|
||||
|
@ -720,9 +727,6 @@ static od_frontend_status_t od_frontend_remote_server(od_relay_t *relay,
|
|||
query_time);
|
||||
}
|
||||
|
||||
if (is_deploy)
|
||||
server->deploy_sync--;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -42,6 +42,7 @@ struct od_server {
|
|||
int offline;
|
||||
uint64_t init_time_us;
|
||||
od_list_t link;
|
||||
bool synced_settings;
|
||||
};
|
||||
|
||||
static inline void od_server_init(od_server_t *server)
|
||||
|
|
Loading…
Reference in New Issue