You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial commit for graceful shutdown
* fmt
* Add .vscode to gitignore
* Updates shutdown logic to use channels
* fmt
* fmt
* Adds shutdown timeout
* Fmt and updates tomls
* Updates readme
* fmt and updates log levels
* Update python tests to test shutdown
* merge changes
* Rename listener rx and update bash to be in line with master
* Update python test bash script ordering
* Adds error response message before shutdown
* Add details on shutdown event loop
* Fixes response length for error
* Adds handler for sigterm
* Uses ready for query function and fixes number of bytes
* fmt
|`pool_mode`| The pool mode to use, i.e. `session` or `transaction`. |`transaction`|
48
48
|`connect_timeout`| Maximum time to establish a connection to a server (milliseconds). If reached, the server is banned and the next target is attempted. |`5000`|
49
49
|`healthcheck_timeout`| Maximum time to pass a health check (`SELECT 1`, milliseconds). If reached, the server is banned and the next target is attempted. |`1000`|
50
+
|`shutdown_timeout`| Maximum time to give clients during shutdown before forcibly killing client connections (ms). |`60000`|
50
51
|`ban_time`| Ban time for a server (seconds). It won't be allowed to serve transactions until the ban expires; failover targets will be used instead. |`60`|
51
52
||||
52
53
|**`user`**|||
@@ -250,6 +251,7 @@ The config can be reloaded by sending a `kill -s SIGHUP` to the process or by qu
info!("Got SIGINT, waiting for client connection drain now");
254
+
255
+
// Broadcast that client tasks need to finish
256
+
shutdown_event_tx.send(()).unwrap();
257
+
// Closes transmitter
258
+
drop(shutdown_event_tx);
259
+
260
+
// This is in a loop because the first event that the receiver receives will be the shutdown event
261
+
// This is not what we are waiting for instead, we want the receiver to send an error once all senders are closed which is reached after the shutdown event is received
0 commit comments