From 3ac9392c11f65205419e9dd4fec26172a8676cdc Mon Sep 17 00:00:00 2001 From: reshke Date: Mon, 4 Mar 2024 05:44:49 +0000 Subject: [PATCH] fix comments --- sources/reset.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sources/reset.c b/sources/reset.c index b29ac3876..7d99361f8 100644 --- a/sources/reset.c +++ b/sources/reset.c @@ -75,7 +75,8 @@ int od_reset(od_server_t *server) wait_timeout, wait_try); wait_try++; rc = od_backend_ready_wait(server, "reset", 1, - wait_timeout, 1); + wait_timeout, + 1 /*ignore server errors*/); if (rc == NOT_OK_RESPONSE) break; } @@ -122,7 +123,7 @@ int od_reset(od_server_t *server) rc = od_backend_query( server, "reset-rollback", query_rlb, NULL, sizeof(query_rlb), wait_timeout, 1, - 0 /*ignore server error messages*/); + 0 /*do not ignore server error messages*/); if (rc == NOT_OK_RESPONSE) goto error; assert(!server->is_transaction); @@ -132,9 +133,10 @@ int od_reset(od_server_t *server) /* send DISCARD ALL */ if (route->rule->pool->discard) { char query_discard[] = "DISCARD ALL"; - rc = od_backend_query(server, "reset-discard", query_discard, - NULL, sizeof(query_discard), wait_timeout, - 1, 0 /*ignore server error messages*/); + rc = od_backend_query( + server, "reset-discard", query_discard, NULL, + sizeof(query_discard), wait_timeout, 1, + 0 /*do not ignore server error messages*/); if (rc == NOT_OK_RESPONSE) goto error; } @@ -144,10 +146,10 @@ int od_reset(od_server_t *server) route->rule->pool->discard_query == NULL) { char query_discard[] = "SET SESSION AUTHORIZATION DEFAULT;RESET ALL;CLOSE ALL;UNLISTEN *;SELECT pg_advisory_unlock_all();DISCARD PLANS;DISCARD SEQUENCES;DISCARD TEMP;"; - rc = od_backend_query(server, "reset-discard-smart", - query_discard, NULL, - sizeof(query_discard), wait_timeout, 1, - 0 /*ignore server error messages*/); + rc = od_backend_query( + server, "reset-discard-smart", query_discard, NULL, + sizeof(query_discard), wait_timeout, 1, + 0 /*do not ignore server error messages*/); if (rc == NOT_OK_RESPONSE) goto error; } @@ -156,7 +158,8 @@ int od_reset(od_server_t *server) server, "reset-discard-smart-string", route->rule->pool->discard_query, NULL, strlen(route->rule->pool->discard_query) + 1, - wait_timeout, 1, 0 /*ignore server error messages*/); + wait_timeout, 1, + 0 /*do not ignore server error messages*/); if (rc == NOT_OK_RESPONSE) goto error; }