Hi Otto, all, On Wed, Aug 16, 2023 at 4:00 PM Otto Kekäläinen via developers <developers@lists.mariadb.org> wrote:
I find it a bit concerning that in this model old clients, instead of getting an error with a human readable explanation of what happened, continue to read stale data. And only way to prevent that is to shut down server A quickly, whereafter the old clients only get an error about server not being reachable and nothing about the old client not supporting redirects.
This reminds me of a recent true story of a DBaaS provider that did not give adequate warning to users when decommissioning a server: https://community.influxdata.com/t/getting-weird-results-from-gcp-europe-wes... https://news.ycombinator.com/item?id=36657829 It was not anything MySQL or MariaDB compatible, and they made matters worse by not only taking the server offline, but also deleting the data immediately. For some users, the only notification was via some web based dashboard, which they might never have accessed. I think that what might be useful is something analogous to the *nix /etc/motd, which is typically displayed to users when they log in. In the case of the MySQL or MariaDB client protocol, that would be some "out of band" data. It would not necessarily have to prevent new connections (at first), merely cause newer clients to output the "warning" message to some log. An example would be: "This server will be decommissioned on 2023-12-13. Please contact https://sales.example.com." Closer to the deadline, attempts to connect would lead to a hard error, along with the message.
Hence, I still feel that Daniel's submission [3,4] would be a better design, being more robust and safer. An error+redirect is easier to reason about regarding integrity of data and error modes than the voluntary maybe-redirect that is now in the works by Yuchen.
[1] https://github.com/MariaDB/server/commit/04b99a30a3f.patch). [2] https://lists.mariadb.org/hyperkitty/list/developers@lists.mariadb.org/threa... [3] https://github.com/MariaDB/server/pull/2681 [4] https://github.com/mariadb-corporation/mariadb-connector-c/pull/22
Could any of these approaches be extended to support a soft or hard "this database will be shut down" notice? Marko -- Marko Mäkelä, Lead Developer InnoDB MariaDB plc