Error message newly shown by patch for bug 782738 is wrong

RESOLVED FIXED in Thunderbird 32.0

Status

defect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: World, Assigned: aceman)

Tracking

(Depends on 1 bug, {regression})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [regression:TB19])

Attachments

(1 attachment, 1 obsolete attachment)

7.78 KB, patch
Irving
: review+
Details | Diff | Splinter Review
+++ This bug was initially created as a clone of Bug #931303 +++
This bug id spin-off of a part of bug 931303 comment #10.

Error message newly shown by patch for bug 782738 is wrong.

By patch for bug 782738, error check of (i) in following is added in addiion to existent error check of (ii), and the error is correctly chcked.
(i)  MsgDBHdr addition to Msgdatabase (<Folder>.msf relevant)
     (eg. for moved new mail by filter)
(ii) Write open of MsgStore file (<Folder> file relevant)
     (e.g. append of mail data of mail moved by filter)

However, same error message is shown, so the error message shown by (i) is pretty confusing, and it always produce misleading because the message mentions error around (ii) only.
The shown message is;
> http://mxr.mozilla.org/comm-central/source/mail/locales/en-US/chrome/messenger/messenger.properties#79
> filterFolderWriteFailed=The messages could not be filtered to folder '%S'
> because writing to folder failed.
> Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
OK, let's ask Irving as he reviewed the culprit patch whether he would accept the change proposed.

I would also support this change as there are bug reports cropping up about users getting folder write errors and filter move errors and distinguishing various causes by proper messages could help us diagnose those.
Flags: needinfo?(irving)
Yes, go ahead and improve the error reporting on this issue.
Flags: needinfo?(irving)
Blocks: 782738
Whiteboard: [regression:??] → [regression:TB19]
WADA, so you want to distinguish when this part fails:
2506   if (destMailDB)
2507     rv = destMailDB->CopyHdrFromExistingHdr(nsMsgKey_None, mailHdr, true,
2508                                             getter_AddRefs(newHdr));
2509   if (NS_SUCCEEDED(rv) && !newHdr)
2510     rv = NS_ERROR_UNEXPECTED;

from this one?

2513     rv = AppendMsgFromStream(inputStream, newHdr, messageLength,
2514                              destIFolder);
2515   }
2516 
2517   if (NS_FAILED(rv))

Yes, currently both failures show the message at:
2525       destIFolder->ThrowAlertMsg("filterFolderWriteFailed", msgWindow);
Flags: needinfo?(m-wada)
(In reply to :aceman from comment #3)
> WADA, so you want to distinguish when this part fails:
> 2506   if (destMailDB)
> 2507     rv = destMailDB->CopyHdrFromExistingHdr(nsMsgKey_None, mailHdr,
> 2508                                             getter_AddRefs(newHdr));
> 2509   if (NS_SUCCEEDED(rv) && !newHdr)
> 2510     rv = NS_ERROR_UNEXPECTED;
> from this one?
> (snip)
Yes.
Although "modification of current message"(refer to both cases) is possible, I believe different messages are better, because "cause of error" and "required action to recover" is absolutely different.
- new message for error in CopyHdrFromExistingHdr(MsgDatabase==.msf related error).
- current message for error in "append mail data to msgStore file".
But is the difference so important that we need to make it known to the common user?
He may not understand the difference of msf vs. the mbox file.
What would be the scenario when one operation succeeds and other fails?
(In reply to :aceman from comment #5)
> But is the difference so important that we need to make it known to the common user?
When eror at "507 rv = destMailDB->CopyHdrFromExistingHdr", "what user needs to do for recovery" is usually "Rebuild-Index of relervant folder".
When error at "2513 rv = AppendMsgFromStream(inputStream, newHdr, messageLength", error occurs on file named "xxx" after "normal xxx.msf open, normal .msf read, normal MsgDHdr creation". So, current message suggests disk space check, write permission check etc.

Why the difference can be never-important?

> He may not understand the difference of msf vs. the mbox file.

Even if so, user needs to check about xxx.msf file if error at "507 rv = destMailDB->CopyHdrFromExistingHdr" occurred, and user needs to check about xxx file if error at "2513 rv = AppendMsgFromStream(inputStream, ..." occurred, before user starts recovery procedure from error.

> What would be the scenario when onen operation succeeds and other fails?

Tyipical case of error at "507 rv = destMailDB->CopyHdrFromExistingHdr" is bug 931303. Read that bug well, please.
A tyipical case of eror at "2513 rv = AppendMsgFromStream(inputStream, ..." is "disk full while appending mail data to file named XXX instead of XXX.msf". So current error message asks user to check it.
Both errors are absolutely independent.
After patch for bug 782738, Tb won't go ahead if error at "507 rv = destMailDB->CopyHdrFromExistingHdr" is detcted. So, after patch for bug 782738, eror at "2513 rv = AppendMsgFromStream" won't happen, if error at "507 rv = destMailDB->CopyHdrFromExistingHdr" is detected.
Flags: needinfo?(m-wada)
Posted patch 957495.patch (obsolete) — Splinter Review
How would you like this?
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #8418276 - Flags: ui-review?(josiah)
Attachment #8418276 - Flags: feedback?(m-wada)
Comment on attachment 8418276 [details] [diff] [review]
957495.patch

Review of attachment 8418276 [details] [diff] [review]:
-----------------------------------------------------------------

Other than a few nits I like this. ui-r+ with the comments addressed.

::: mail/locales/en-US/chrome/messenger/messenger.properties
@@ +80,5 @@
>  deletingMsgsFailed=Unable to delete messages in folder %S because it is in use by some other operation. Please wait for that operation to finish and then try again.
>  alertFilterCheckbox=Do not warn me again.
>  compactFolderDeniedLock=The folder '%S' cannot be compacted because another operation is in progress. Please try again later.
>  compactFolderWriteFailed=The folder '%S' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
> +filterFolderHdrAddFailed=The messages could not be filtered to folder '%S' because adding a message to it failed. Verify that the folder is displaying properly or repairing it from the folder properties.

I think the last sentence should read: "Verify that the folder is displayed properly or try to repair it from the folder properties.

::: suite/locales/en-US/chrome/mailnews/messenger.properties
@@ +73,4 @@
>  alertFilterChanged=Filters associated with this folder will be updated.
>  filterDisabled=The folder '%S' could not be found, so filter(s) associated with this folder will be disabled. Verify that the folder exists, and that filters point to a valid destination folder.
>  filterFolderDeniedLocked=The messages could not be filtered to folder '%S' because another operation is in progress.
>  parsingFolderFailed=Unable to open the folder %S because it is in use by some other operation. Please wait for that operation to finish and then select the folder again. 

White space, could you remove this while you're here?

@@ +77,5 @@
>  deletingMsgsFailed=Unable to delete messages in folder %S because it is in use by some other operation. Please wait for that operation to finish and then try again.
>  alertFilterCheckbox=Do not warn me again.
>  compactFolderDeniedLock=The folder '%S' cannot be compacted because another operation is in progress. Please try again later.
>  compactFolderWriteFailed=The folder '%S' could not be compacted because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.
> +filterFolderHdrAddFailed=The messages could not be filtered to folder '%S' because adding a message to it failed. Verify that the folder is displaying properly or repairing it from the folder properties.

I think the last sentence should read: "Verify that the folder is displayed properly or try to repair it from the folder properties.
Attachment #8418276 - Flags: ui-review?(josiah) → ui-review+
Posted patch patch v2Splinter Review
Thanks.
Attachment #8418276 - Attachment is obsolete: true
Attachment #8418276 - Flags: feedback?(m-wada)
Attachment #8420641 - Flags: review?(irving)
Attachment #8420641 - Flags: feedback?(m-wada)
Attachment #8420641 - Flags: review?(irving) → review+
WADA, can you please look over the patch if it is what you wanted? It is ready for check in now.
Flags: needinfo?(m-wada)
I think new filterFolderHdrAddFailed is good.
Flags: needinfo?(m-wada)
Thanks.
Keywords: checkin-needed
Attachment #8420641 - Flags: feedback?(m-wada)
https://hg.mozilla.org/comm-central/rev/66e6235a2201
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 32.0
You need to log in before you can comment on or make changes to this bug.