How Cloudflare Fixed a Caching Bug in Hyperdrive for MySQL
XORit Editorial · Sources, AI assistance and corrections

During beta testing of Hyperdrive’s MySQL support, a customer reported occasional empty responses to queries that were expected to return results. The error occurred in about 0.001% of cases and only when caching was enabled.
The cause lay in differences between the capabilities of the Worker MySQL client and Hyperdrive. A client node could store bytes already converted for Worker in the shared cache, while an end node could read them as data in Hyperdrive’s format. The format mismatch led to empty results or hangs.
Cloudflare changed the write logic: the cache now always receives a canonical version of the result, encoded using Hyperdrive’s capabilities. After the fix was released, the empty-row issue disappeared, and the client nodes’ successful connection rate reached 99.99%. The company also said that MySQL support in Hyperdrive is available to everyone.
Translation editors: Соловьев В., Пеков А.
Source: blog.cloudflare.com ↗