about "i#52: lock database"

Ivan Glushkov gli.work at gmail.com
Wed Mar 21 12:51:24 PST 2007


Hello.

Description to i#52: "An issue database should be locked before performing  
changes in it."

My thoughts:
We have to lock the database while perfoming changes in order to forbid  
other users to corrupt it.
It has some sense only when several users work with the same copy of  
ditrack.
Locking might be done with some special file inside "issues" directory,  
for example .lock.<user>.date
After making all changes lock file should be deleted.
If lock file still exists nobody is permitted to make any changes. In this  
case diagnostic message will appear, something like "Can't execute %s  
command, user %s at %s had locked database (file issues/%s)" % (user,  
date, filename).
If database was locked too long ago (2 hours?) we should have some option  
to force making changes in database.

Your opinions?

Ivan.



More information about the Dev mailing list