[Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only added (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Jun 28 18:07:11 CEST 2012
- Previous message: [Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only added
- Next message: [Python-Dev] Bitbucket mirror?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 28 Jun 2012 16:16:45 +0300 Petri Lehtinen <petri at digip.org> wrote:
Antoine Pitrou wrote: > > If messages were only added, a new file is no longer created and > > renamed over the old file when flush() is called on an mbox, MMDF or > > Babyl mailbox. > > Why so? Appending is not atomic and, if it fails in the middle, you > could get a corrupt mbox file. > Furthermore, I disagree that it's a bugfix: IMO it should wait for 3.4.
The code previosly already appended messages to the end of the file when calling add(). This patch just changed it to not do a full rewrite when flush() is called.
Ok, I agree it sounds good then. Thanks for explaining.
Regards
Antoine.
- Previous message: [Python-Dev] cpython (2.7): #9559: Append data to single-file mailbox files if messages are only added
- Next message: [Python-Dev] Bitbucket mirror?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]