james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [PATCH] mbox mail repository V2
Date Sun, 17 Aug 2003 06:06:25 GMT

> When I need to delete a message I do the following:
> 1) Open the mbox file and a work file
> 2) Copy the mbox file into the work file until I
>    reach the message to delete
> 3) Skip the copying until I've found the next message header
> 4) Continue copying the mbox file into the work file
> 5) Delete the old mbox file and rename the work file to be
>    the mbox file

> for each message of a 2000 message mbox the file will have
> to be copied 2000 times.

What if the delete operation locked the file and queued the delete for a
background thread, which would kick off in, oh let's say 1 second?  The
delete thread would run through the deletion list, and then unlock the file.
In the common case where there is either a single delete, or when POP3
deletes a whole series at once (when the POP3 session finishes), the mailbox
could do all of the deletes in a single pass, sorted by position within the

	--- Noel

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message