Closed Bug 1644260 Opened 5 years ago Closed 5 years ago

Xulstore writing can still occur during late shutdown

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: alexical, Assigned: alexical)

References

Details

Attachments

(1 file)

Bug 1638166 sought to eliminate late writes during shutdown by the xulstore by flushing writes on the main thread. However, we still see writes due to get_database itself performing a write, resulting in a call to mdb_env_setup_locks which writes to disk in order to set up locking on the db. We should not call get_database if there are no changes to persist.

In bug 1638166 we added a call to persist xulstore changes on the main thread
during shutdown, to ensure that all changes were flushed if we were about to do
an _exit(0). Unfortunately I neglected to notice that get_database does a write
inside mdb_env_setup_locks, which trips our late write checking, and is also
just generally unnecessary / inefficient if there are no changes. This ensures
that we don't do any disk-level locking if there aren't any changes to commit.

Assignee: nobody → dothayer
Status: NEW → ASSIGNED
Pushed by dothayer@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/76de3ec91992 Do not get xulstore db if no changes r=lina
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: