Opened 10 years ago

Last modified 13 months ago

#648 new defect

Allow readers to lock revisions

Reported by: Olly Betts Owned by: Olly Betts
Priority: normal Milestone: 2.0.0
Component: Backend-Glass Version: git master
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

If readers could lock the revision they were reading, DatabaseModifiedError could be avoided.

Brass now uses a freelist implementation to track the blocks which are free in each revision, so keeping multiple old revisions around is more feasible than it would be with the old base files.

Marking for 1.3.3 for now.

Change History (6)

comment:1 by Olly Betts, 10 years ago

In #40, the following approach is suggested:

[If] readers use fcntl locking on a single byte corresponding to the revision they're using (bytes off the end of the file can be locked, and shared locks on read-only files are ok). Then a writer would only delete old revisions for which it could obtain an exclusive lock (otherwise it would preserve them).

comment:2 by Olly Betts, 9 years ago

Component: Backend-BrassBackend-Glass

comment:3 by Olly Betts, 9 years ago

Milestone: 1.3.31.3.4

comment:4 by Olly Betts, 8 years ago

Milestone: 1.3.41.4.x

Would be nice, but it's time to get brutal to get 1.4.0 out.

This could probably be done in a compatible way - a reader running an older version would just get DatabaseModifiedError (and probably a reader running a newer version could choose whether to lock or not, and if it didn't it would be just like a reader running an older version).

comment:5 by Olly Betts, 13 months ago

Version: SVN trunkgit master

comment:6 by Olly Betts, 13 months ago

Milestone: 1.4.x2.0.0
Note: See TracTickets for help on using tickets.