| Summary: | Take an assertion if there is open database connection | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED CONFIGURATION CHANGED | ||||||
| Severity: | Normal | CC: | achristensen, beidson, cdumez, ggaren | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Sihui Liu
2019-04-11 12:42:54 PDT
Created attachment 367234 [details]
Patch
My understanding was that it is OK to suspend while databases are open. It is only not OK when there are pending transactions because the database file is locked when there is an operation running. I believe holding an assertion whenever there is an open database would be a significant power regression. Comment on attachment 367234 [details]
Patch
r- due to my earlier comments. If my understanding is wrong somehow, let me know.
(In reply to Chris Dumez from comment #2) > My understanding was that it is OK to suspend while databases are open. It > is only not OK when there are pending transactions because the database file > is locked when there is an operation running. > > I believe holding an assertion whenever there is an open database would be a > significant power regression. I thought about this. If this is the case, why do we closeAllDatabases when ProcessWillSuspendImminently? We could just let the running transaction be finished or interrupted? Also, if this causes big power regression, shouldn't we find all the places that could have database connection open for a long time but not actually doing anything and close them? I was told we are not supposed to keep open database connection when there is no database activity. (In reply to Chris Dumez from comment #2) > My understanding was that it is OK to suspend while databases are open. Actually simply having an open sqlite3* connection that isn't doing thing makes it so we cannot suspend. *sigh* That said, I agree with your power observation here and Sihui and I discussed a good way forward. |