Closed Bug 1717375 Opened 3 years ago Closed 3 years ago

comm/mailnews/db/gloda/test/unit/test_index_junk_local.js fails when default store is maildir

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
94 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: benc, Assigned: benc)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

To replicate, switch to maildir as default. In your build's dist/bin/defaults/pref/mailnews.js:

-pref("mail.serverDefaultStoreContractID", "@mozilla.org/msgstore/berkeleystore;1");
+pref("mail.serverDefaultStoreContractID", "@mozilla.org/msgstore/maildirstore;1");

and run the test:

$ ./mach xpcshell-test comm/mailnews/db/gloda/test/unit/test_index_junk_local.js
Blocks: 765926

Notes to self:
The reason this is failing is that the maildir store implements a copyMessages() function which can short-circuit copies within the same store (by just copying the files). This short-circuited maildir copy works, but it seems to be lacking the notifications that gloda relies on to keep its index updated. The test passes when the maildir short-circuit is disabled, requiring a full message copy - the same code path as mbox.

Some more notes to leave myself some breadcrumbs on message copying:
It wasn't a case of missing notifications in the short-cut maildir copyMessages(). It was too many notifications. The nsIMsgCopyServiceListener OnStartCopy/OnEndCopy pair was being invoked more than once and that was screwing up the generator-based async waits in the test code.
Comment 2 patch should fix this.

See Also: → 1731177
Target Milestone: --- → 94 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/a40a35624384
Avoid doubling-up nsIMsgCopyServiceListener notifications during maildir->maildir message copying. r=mkmelin

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e584d77100d3
Remove unused copylistener param in nsIMsgPluggableStore.copyMessages(). r=mkmelin

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: