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
Breaking: OCaml 5.5 or later is required. The opam files asked for 5.4, which CI tested and nothing else did; every switch the code is written in is 5.5.
A row function that raises while Pool.use drains its unread answers no longer takes the connection out of the pool for good: the connection goes back, is made again at the next lend, and the exception reaches the caller as raised, not wrapped in Fun.Finally_raised.
Breaking: an Eio cancellation stops a Pool.use borrower at once, wherever it waits. f was shielded until it returned, so a cancelled borrower waited for work nobody wanted, or forever on something the cancellation had stopped. Its statement is still cancelled at the server; its connection is now closed and made again at the next lend.
A Timeout, or an Eio cancellation of a statement under way, cancels the statement at the server as it closes the connection. Before, only a pool's cancelled borrower did; elsewhere the server ran the statement to its end with nobody to read it. The request has 5 s, or the timeout if that is shorter, and a pool's cancelled borrower's has the pool's timeout: with the timeout lifted, a server that never closed the request's connection held the caller forever.
Listener.next returns a notification that arrived in the same read as the end of the listener's own answer (a LISTEN, or the heartbeat's empty query) at once. It waited for the next heartbeat, ten seconds by default, though the notification was already read.
Cancelling Listener.next while it waits keeps the connection. It closed it, so a loop racing next against a tick reconnected at every tick and lost what was sent meanwhile. Only the read after the socket is readable is shielded, and what it reads is kept for the next call.
A loop racing Listener.next against a tick shorter than heartbeat_s sends its heartbeats, and notices a dead server within heartbeat + timeout. Each next counted the heartbeat from its own start, so such a loop never sent one. The heartbeat now counts from the last time the listener heard the server, and one under way when next is cancelled is finished, within the timeout, rather than closing the connection.
Breaking: a Listener whose server is restarting waits for it: an error of class 57P while it reconnects (57P03, the server starting up) is retried with backoff, as a lost connection is, and no longer returned by next. It ended the loop with the error, though the server would take the sign-in a moment later. Any other server refusal is still returned.
Pool.error_to_string prints a Pool.error, what Pool.use answers, as error_to_string prints a connection's error.
Connecting keeps a random generator the application set as mirage-crypto's default, and sets one only where none is. Every connection replaced it with Mirage_crypto_rng_unix.use_default ().
A connection's read buffer goes back to 4 KiB once it is empty after a message over 128 KiB. It kept the size of the largest message it had read, so one large row held that memory for a pooled connection's life.
A keyword connection string whose password holds an unquoted space no longer quotes the part after the space in its error, which was part of the password. A word after password= is never quoted; the error says to quote the password, password='a b'.
Breaking: Pool.error is [ `Pool of [ `Busy | `Closed ] ], the pool's states under the pool, so an error merged with others says which resource refused. Pool.use answers `Pool `Busy where it answered `Busy, and `Pool `Closed on a closed pool, at once, as it does to a borrow waiting when the pool closes. A closed pool waited out wait_s, logged that no connection came free, and returned `Busy, though none ever would.
The cancel request of abandon has 5 s, or the timeout if that is shorter, as a timeout's does. It had the connection's timeout alone, so with the timeout lifted, as a migration lifts it, a server that never closed the request's connection held the lender forever.
A row or chunk function that raises cancels its statement at the server as the connection closes, as a timeout does, and its exception still propagates as raised. The connection closed alone, and the server ran the statement to its end with nobody to read it.
Breaking: Conninfo.protocol_minor is no longer exported. It was a step of the start-up, the minor version a StartupMessage carries, and nothing outside the driver used it.
A connect_timeout_s of zero or less falls back to the connection's timeout_s, as Conninfo documents. A Conninfo.t built by hand with Some 0. timed out every attempt at once; a parsed connection string never carried one.