Closed Bug 1792124 Opened 2 months ago Closed 2 months ago

Calendar storage provider opens multiple connections to the same database file

Categories

(Calendar :: Provider: Local Storage, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102+ fixed, thunderbird106 fixed)

RESOLVED FIXED
107 Branch
Tracking Status
thunderbird_esr102 + fixed
thunderbird106 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

Details

(Keywords: regression)

Attachments

(2 files)

Each instance of CalStorageCalendar creates its own database connection, even if it uses the same file as another CalStorageCalendar. This means if two calendars are trying to write at the same time, exceptions are thrown and stuff breaks.

Version: unspecified → Thunderbird 102

Are you sure this was regressed by bug 1722752? Most of the work there was moving around old code.

Target Milestone: --- → 107 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/4400261eaf8e
Use only one connection per calendar database file. r=leftmostcat

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/d688efe0dd76
follow-up lint fix. rs=bustage-fix DONTBUILD

(In reply to Lasana Murray from comment #2)

Are you sure this was regressed by bug 1722752? Most of the work there was moving around old code.

Hmm, no. I'm not. This problem appears to be much, much older. But I haven't had a problem with it until the last who-knows-how-many months, which is weird. Perhaps something else changed that made it more obvious.

No longer regressed by: 1722752
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/12ab3dd625b2
Use only one connection per calendar database file. r=leftmostcat
Keywords: leave-open

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e04f31ba752e
Test for shared calendar database connections. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7401e01653d2
follow-up - Fix broken test. rs=bustage-fix
Severity: S1 → S2
Priority: P2 → --

Comment on attachment 9295912 [details]
Bug 1792124 - Use only one connection per calendar database file. r=leftmostcat

[Approval Request Comment]
Regression caused by (bug #): ancient history
User impact if declined: writing to the database can throw errors, aborting whatever was happening at the time. This can lead to items not appearing in the calendar.
Testing completed (on c-c, etc.): landed this week
Risk to taking this patch (and alternatives if risky): low

Attachment #9295912 - Flags: approval-comm-beta?

Comment on attachment 9296310 [details]
Bug 1792124 - Test for shared calendar database connections. r=#thunderbird-reviewers

[Approval Request Comment]
Test for fix in this bug. Note there was a follow-up to this patch that also needs to be uplifted.

Attachment #9296310 - Flags: approval-comm-beta?

Comment on attachment 9295912 [details]
Bug 1792124 - Use only one connection per calendar database file. r=leftmostcat

[Triage Comment]
Approved for beta

comments 7,9,10 all uplift

Attachment #9295912 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9296310 [details]
Bug 1792124 - Test for shared calendar database connections. r=#thunderbird-reviewers

[Triage Comment]
Approved for beta

comments 7,9,10 all uplift

Attachment #9296310 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9295912 [details]
Bug 1792124 - Use only one connection per calendar database file. r=leftmostcat

[Approval Request Comment]
Regression caused by (bug #): ancient history
User impact if declined: writing to the database can throw errors, aborting whatever was happening at the time. This can lead to items not appearing in the calendar.
Testing completed (on c-c, etc.): in beta 4
Risk to taking this patch (and alternatives if risky): low

All three patches here. Not going to waste time requesting approval for all of them.

Attachment #9295912 - Flags: approval-comm-esr102?

Comment on attachment 9295912 [details]
Bug 1792124 - Use only one connection per calendar database file. r=leftmostcat

[Triage Comment]
Approved for esr102 - all three patches

Attachment #9295912 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.