Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Mar 4, 2024
1 parent ab3302d commit 3ac9392
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions sources/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 3ac9392

Please sign in to comment.