We use MyISAM. When you run out of disc space, MyISAM just sits there and waits. And waits, and waits, apparently forever, for some space to become available.
This is not good, because an auditing/logging application (which ours is) may have lots of available servers which it could send its data to - getting an error from one would simply mean that the data could be audited elsewhere.
But if the server just hangs, and waits, the application isn't (currently) smart enough to give up and try another server, so it hangs the audit process too. Which means that audit data starts to back up, and customers wonder why they can't see recent data in their reports etc.
There has to be a better way. I propose
- A background thread monitors the disc space level every few seconds
- When it falls below a critical level (still more than can reasonably be filled up in a few seconds), force the server to become read-only
- When in this mode, modifications to the data fail, quickly, with an error code which tells the process (or develope) exactly what the problem is (Out of disc space)
- When the disc space falls below some threshold, the read-only mode is turned back off.
Drizzle etc, should do this.
Or perhaps, it's a job for the storage engine?