The file socket to mailbox can be opened in PR_RDONLY

VERIFIED FIXED

Status

VERIFIED FIXED
17 years ago
10 years ago

People

(Reporter: naving, Assigned: naving)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

17 years ago
Right now we open local folders/mailbox in PR_RDWR mode. I have checked the code
and we don't need to open in PR_RDWR. We can open in PR_RDONLY because all we 
do through these file connections is read. Whenever we do a write we open
outputfileStream separately. This should help in reducing closing time PR_Close 
where it slow. Also it will help in safeguarding unwanted writes.
(Assignee)

Comment 1

17 years ago
Created attachment 56336 [details] [diff] [review]
fix
(Assignee)

Comment 2

17 years ago
All mailbox actions have been tested and they work fine. compacting also tested. 

cc bienvenu for review.

Comment 3

17 years ago
well, this looks ok, but ideally we would open the file rdrw if we were going to
change the read flag, for example, and then pass the open file handle to the
code that updates the folder flag. So we may have to revisit this.

Comment 4

17 years ago
Comment on attachment 56336 [details] [diff] [review]
fix

r=bienvenu, but see my comments.
Attachment #56336 - Flags: review+

Comment 5

17 years ago
Comment on attachment 56336 [details] [diff] [review]
fix

sr=mscott

Can you make sure things like compact folders still work after this change? Just making sure they (like other write operations) are going through a different code path.
Attachment #56336 - Flags: superreview+
(Assignee)

Comment 6

17 years ago
this was checked in long time back. 
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
QA Contact: esther → stephend
Navin, safe to verify this using LXR?
(Assignee)

Comment 8

17 years ago
yep, it is. it sure has been tested on trunk for over a month now...
Verified FIXED via code inspection via LXR:

1.93 naving%netscape.com Nov 5 20:25 108276. Open the mailbox in PR_RDONLY mode
because only read operations are done using
this connection. should cut down closing mailbox (PR_Close()) time.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.