Bug 191416

Summary: Add multiuser locking record records
Product: [Applications] KEXI Reporter: S. Vetter <svetter>
Component: GeneralAssignee: Kexi Bugs <kexi-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: adam, inksi, staniek
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S. Vetter 2009-05-03 05:33:31 UTC
Version:           1.1.3 (using KDE 3.5.10)
OS:                Linux
Installed from:    SuSE RPMs

   In a multi-user operation there must be some method of locking one or more records in the database.  This is to prevent data corruption.
   An example of this would be: There are two or more users. There is also a database called automobiles.  Person one is working on record number 5.  Another is working on record number 7.  The third user wants to look at and update record 5.  Right now what prevents the third user from also looking at and trying to update record number 5?
   I would imagine that there should be a locking file that says: 
username  database   record# type
One      automobile    5     readwrite 
Two      autobobile    7     readwrite
Three    automobile    5     pending access

   Also, there must be a way to clear one or more entries from the lock file should a user be disconnected and Kexi is not informed.
Comment 1 Jarosław Staniek 2009-05-03 22:58:52 UTC
Fully agree. What we need is some kind of notification of each instance of Kexi (on any machine) about events of reading/writing of the records. Different update strategies may be applied. 

BTW, I guess what you mean by the "data corruption" is "logical data corruption". At physical level the database (let it be SQLite or one of the server db) is protected by transations, but indeed not locked, so the former write can be quickly overwritten by the subsequent write.