open cookie db unshared and exclusive

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: dwitte, Assigned: ebutler)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

10 years ago
sdwilsh says this will help with perf a little, and it should work just fine since we don't expect other people to mess with our db while we're running and have it open.
(Assignee)

Comment 1

10 years ago
Created attachment 333259 [details] [diff] [review]
ver 1

flagging dwitte for review
Assignee: nobody → ebutler
Status: NEW → ASSIGNED
Attachment #333259 - Flags: review?(dwitte)
(Assignee)

Comment 2

10 years ago
Created attachment 333261 [details] [diff] [review]
ver 2

added a comment to explain what the pragma is doing.
Attachment #333259 - Attachment is obsolete: true
Attachment #333261 - Flags: review?(dwitte)
Attachment #333259 - Flags: review?(dwitte)
(Reporter)

Comment 3

10 years ago
Comment on attachment 333261 [details] [diff] [review]
ver 2

r=dwitte, i assume this passes unit tests?
Attachment #333261 - Flags: review?(dwitte) → review+
(Assignee)

Comment 4

10 years ago
Yes, it still passes unit tests. Flagging checkin-needed.
Keywords: checkin-needed
(Reporter)

Comment 5

10 years ago
thanks! maybe bholley can help out with checkin ;)
pushed in 42a7ea1650c9
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED

Comment 7

9 years ago
Until now concurrent access by reading and even writing the file by third party applications was possible and supported, even if Firefox was running. This is now hindered by the lock.
Is there any evidence of measurable performance improvement or shouldn't it be reverted for copatibility reasons?
And why a read lock as well?
An exclusive lock is a write lock, and SQLite doesn't permit reads when a write lock is held.  This landed before beta 2 of Firefox 3.5 which was the cutoff for third-party breaking changes.

Comment 9

9 years ago
So that means I missed the chance as I did not report about possible problems with that change before beta 2?

How would you recommend thrid party cookie managers to allow management of Firefox Cookies while Firefox is running? Are Firefox Plugins provided with an API to manage cookies? That plugin could then communicate with the application itself.
(Reporter)

Comment 10

9 years ago
Firefox extensions have access to APIs to do anything they want with cookies.

Comment 11

9 years ago
However, how can external windows applications communicate with Firefox extensions and raise Javascript functions in the externsion's code? Is there support for mutexes, WM_COPYDATA messages, names pipes or similar? How can extensions respond to these messages sending data back to the application?

As stated, it seems this will be the only workaround to allow cookie management from an external application while firefox is running, because of the exclusive locking mode that is now used for the cookie database.

Comment 12

9 years ago
Named pipes is no solution currently, see Bug 500151.

Comment 13

8 years ago
This behavior seems to have been changed in FF4, b7, it sqlite-wal and -shm files (write ahead locking).
(In reply to comment #11)
> However, how can external windows applications communicate with Firefox
> extensions and raise Javascript functions in the externsion's code? Is there
> support for mutexes, WM_COPYDATA messages, names pipes or similar? How can
> extensions respond to these messages sending data back to the application?
External applications shouldn't be modifying the database anyway; it won't change things until Firefox is restarted, and they run the risk of corrupting the database.

> As stated, it seems this will be the only workaround to allow cookie management
> from an external application while firefox is running, because of the exclusive
> locking mode that is now used for the cookie database.
As stated above, this wasn't doing what you wanted anyway, and it won't even in Firefox 4 (and any bug asking it to work would be resolved as WONTFIX)
You need to log in before you can comment on or make changes to this bug.