Closed Bug 329960 Opened 18 years ago Closed 17 years ago

Keep DB file locked while AsycIO is working

Categories

(Toolkit :: Storage, defect, P4)

x86
All
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: brettw, Unassigned)

References

Details

I am worried about other programs coming through and trying to share the file, which will break with our asynchronous I/O. The locks aren't perfect, but should give a measure of safety.
OS: Linux → All
Priority: -- → P3
Flags: blocking-firefox2?
Priority: P3 → P4
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: --- → mozilla1.8.1beta1
Whiteboard: at risk
Target Milestone: mozilla1.8.1beta1 → mozilla1.8.1beta2
Vlad - do we need this for 1.8.1?  What are the sharing cases we are worried about ?
The issue is that if some other process tries to write to the database while we have async IO going, it could get corrupted.  I don't think this is a security issue; it can only lead to file corruption, and even then it would be rare (they'd have to explicitly run something that tries to modify the storage db).  Unless there's something that Brett saw that I'm not seeing, I don't think this should block b1.
I don't think it should block B1 or even Fx2. We already lock the profile for other reasons, and there are other files that will get corrupted as well if there is >1 writer.
minusing based on brett and vlad's comments.
Flags: blocking-firefox2+ → blocking-firefox2-
Whiteboard: at risk
I'm not sure if/when we're going to do this.
Assignee: brettw → vladimir
Target Milestone: mozilla1.8.1beta2 → ---
This should be easy once bug 380345 is submitted. Just locking the file when requested should be sufficient. Currently, I think we need to track how many connections there are to know when to lock and unlock, which is difficult and why it's been stalled for so long.
Depends on: 380345
This is the changes that the sqlite people made with their async stuff to enable file locking:
http://www.sqlite.org/cvstrac/filediff?f=sqlite/src/test_async.c&v1=1.10&v2=1.11
No longer needed since we no longer do async IO.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.