Charta Software
Back to the base
E-mail:
Wachtwoord:
Aangemaakt door op 2009-08-30 17:26:35
Laatst gewijzigd op 2010-01-22 09:32:47

Stabilized Charta database a bit

The Charta database in some cases could easily get corrupted. Now it should be much harder to corrupt the database.

By introducing the roll back operation on a Charta database transaction I have attempted to make the database more stable. Formerly one could encounter a Page already locked exception. When this exception is raised it is a signal that something is seriously wrong and the database would be corrupted beyond repair. This should be a thing of the past now. Now, when any exception is raised during a transaction, the transaction is rolled back and the page locks are released. If you still encounter the Page already locked exception, please let me know.

Please note that the above mentioned transactions are currently very short lived. They merely correspond to atomic database operations in Charta. During a typical execution of Charta code usually there are a lot of such transactions involved. The current improvement guarantees that no database corruption occurs at a low level of the database but not that all changes made during the execution of Charta code are reverted. This transaction functionality will be added in the future.

Berichten

User informed about the roll back?
Aangemaakt door op 2009-08-31 10:17:52
So the database is more stable by a "low level" roll back. How is the user informed about this roll back? Is an exception thrown with/without a call stack?
The original exception will be re-raised
Aangemaakt door op 2009-08-31 12:30:40
Laatst gewijzigd op 2009-08-31 12:30:58
Basically, whenever an exception is thrown within low level database code, the transaction will be rolled back and the original exception will be re-raised. So, the user will still see the original exception. One example of how such an exception can occur is when higher level code tries to access data that does not exist (anymore). Previously this caused an exception to be raised and certain pages to remain locked. When those pages were accessed again a Page already locked exception was raised, leaving even more pages in an inconsistent state. These issues should be resolved now.