Two more patches

Bron Gondwana brong at fastmail.fm
Wed Oct 24 20:51:25 EDT 2007


On Wed, Oct 24, 2007 at 09:50:26AM -0400, Ken Murchison wrote:
> Bron Gondwana wrote:
>> On Wed, 24 Oct 2007 07:55:55 -0400, "Ken Murchison" <murch at andrew.cmu.edu> 
>> said:
>>> It look to me like we bail out if we are missing a message listed in 
>>> cyrus.expunge.  Is this correct?  Do we want to abort a reconstruct in 
>>> this case?
>> No, just strip the record from the .expunge file.  I didn't change the
>> expected behaviour (from what I could see of the code), just the
>> correctness of the generated file.
>
> OK, but what does this code check for?
>
> 	if (expuid_pos != expuid_idx) {
> 	    syslog (LOG_ERR,
> 		    "IOERROR: %m failed to find all records for: %s",
> 		    newfnamebuf);
> 	    close(expunge_fd);
> 	    map_free(&index_base, &index_len);
> 	    free(expuid);
> 	    fclose(fexpunge);
> 	    return IMAP_IOERROR;
> 	}

It checks that we actually wrote out all the records that
we found above.  If this fails, then we don't rewrite
cyrus.expunge at all.  It can't (theoretically) ever
happen because we just generated the expuid list from
the same index file anyway, but I thought it was worth
checking.  It's the same block of response code as any
other IOERROR writing out the new file.  It certainly
doesn't unlink the original cyrus.expunge or anything
crazy like that.

Bron.


More information about the Cyrus-devel mailing list