bugmonotone - Bugs: bug #15079, Saner handling of database...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #15079: Saner handling of database read/write transactions

Submitted by:  Nathaniel Smith <njs>
Submitted on:  Sun 27 Nov 2005 11:41:02 AM UTC  
 
Category: storage systemSeverity: 1 - Wish
Item Group: code cleanupStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open
mtn version --full: 

Sun 27 Nov 2005 11:41:02 AM UTC, original submission:

Ideal behavior:
-- all commands acquire either a read lock or a write lock
-- they either succeed entirely (wrt locking, anyway), or fail immediately at the beginning of their run

To do this right, we should have a static difference between "readable db" and "readwriteable db", I think. (This makes certain kinds of caching harder, of course, logically non-writing operations might in fact want to update caches or something... fortunately we have no such on-disk caches ATM.)

Then each command could receive one sort of db or the other, and pass it on to each function it calls. Then all the above properties could be achieved statically.

This full solution is a bit intrusive, though IMO fully worth it. In the mean time, it would be good to, e.g., have read and write transactions, and ensure at run time that write operations only occurred inside write transactions. This solution is bad in the long run, though, because with it we will have another class of bugs that always come back sooner or later.

Nathaniel Smith <njs>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup