I think that eXist-db takes the latter approach - the database becomes read-only when the disk is limited in space
---- Original Message ---- From: christian.gruen@gmail.com To: thomas.kaltofen@risc.uni-linz.ac.at Subject: Re: [basex-talk] Adding documents to database while space on diskdrive runs out Date: Thu, 22 Nov 2012 19:08:01 +0100
Dear Thomas,
Im sorry that your data got corrupted. I agree that such a test
would
be a desirable addition, Im afraid its often difficult to guess
how
much space will be occupied by a specific update operation. We could generally disable update operations when the remaining space falls below a given limit, but once again such a limit would be strongly dependent on the used system and use cases.
Rollbacks are on our long-term todo list (along with, or even
without
MVCC), similar to incremental backups, but if memory gets low, they may as well lead to unexpected behavior.
All the best, Christian _________________________________________
I just had the problem that the disk space of the drive where a
BaseX database instance was stored ran out while adding a new document to the database via the server interface. The result was a half-finished document in the database resulting in ArrayIndexOutOfBounds-exceptions when querying the database and strange behavior of the GUI (views are not shown and even disabled). Would it be possible to check for sufficient disk space before writing to the database files? Moreover, it would be nice if the failed transaction of adding the document while the space ran out could be rolled back somehow to get the database back into a consistent state.
Thank you for your support!
Best regards, Thomas _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
On 11/22/2012 09:14 PM, pw@themail.co.uk wrote:
I think that eXist-db takes the latter approach - the database becomes read-only when the disk is limited in space
BTW: What do relational DBSs do? Seems even MySQL for instance doesn't prevent something like this (well at least it seems the data isn't commited such that the database isn't in an inconsistent state?)?
http://www.nixgurus.com/mysql/how-to-change-mysql-data-directory/
I guess the only thing which really works and is reliable in _all_ cases is a rollback if not enough space is provided. Ok, just found something in a german reference doc -- the default maximum size is 4gb, otherwise if a transaction requires more space a rollback is issued. I guess it is also first checked (perhaps once a transaction is started) if this or another minimum size of space is still available.
kind regards, Johannes
basex-talk@mailman.uni-konstanz.de