Closed Bug 108276 Opened 23 years ago Closed 23 years ago

The file socket to mailbox can be opened in PR_RDONLY

Categories

(MailNews Core :: Backend, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: naving, Assigned: naving)

Details

Attachments

(1 file)

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.
Attached patch fixSplinter Review
All mailbox actions have been tested and they work fine. compacting also tested. 

cc bienvenu for review.
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 on attachment 56336 [details] [diff] [review]
fix

r=bienvenu, but see my comments.
Attachment #56336 - Flags: review+
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+
this was checked in long time back. 
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: esther → stephend
Navin, safe to verify this using LXR?
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.

Attachment

General

Creator:
Created:
Updated:
Size: