Two more patches

Ken Murchison murch at andrew.cmu.edu
Wed Oct 24 07:55:55 EDT 2007


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?


Bron Gondwana wrote:
> Here are two more patches.  Here's a transcript showing the bug for one:
> 
> [root at imap6 AATemp]$ /home/mod_perl/hm/utils/oneoff/index_uids.pl cyrus.expunge
> V:10 E:4 U:219
> 214 023a77a9abd31bf67627436c0000000000000000 670
> 218 3a7b23f2a4534d8228c911557d29292e5d7cf31b 2572
> 108 020d514c4ef61a9a433cdeae0000000000000000 2426
> 216 bd75b9801845f4ed4be2863c09fbec3bd2fa27e1 5105
> [root at imap6 AATemp]$ rm -f /mnt/data8/slot608/store23/data/b/user/brong/AATemp/218.
> [root at imap6 AATemp]$ cyr slot608 reconstruct -k user.brong.AATemp
> user.brong.AATemp
> [root at imap6 AATemp]$ /home/mod_perl/hm/utils/oneoff/index_uids.pl cyrus.expunge
> Unknown header format 0
> 
> 
> Basically, the whole codepath for reconstructing a cyrus.expunge file was bogus in
> the case where some but not all of the data files were present.  I found this
> during the CRC32 code review.
> 
> Very rare case, but nasty effect (bogus cyrus.expunge file with no header).
> 
> 
> Here's the test system with the patch applied:
> 
> root at test1:/slot2/meta/domain/f/fastmailtest.com/t/user/testuser/TestReconstruct# /home/mod_perl/hm/utils/oneoff/index_uids.pl cyrus.expunge
> V:10 E:5 U:8
> 3 a2da2791a37c6ad82b89b5be527c6b8a0d024c22 4115
> 8 a114e435b5850f0d26664fb58645011541c8361c 3721
> 25 b11b4f6b57f0c81651402e0de06c6d7bb23dd0ff 3898
> 26 0a15656dd6181d590949abc8e219e04b3d46751d 30666
> 23 5a2fe827320f07a731d511be942c472e4213be6f 3957
> root at test1:/slot2/meta/domain/f/fastmailtest.com/t/user/testuser/TestReconstruct# rm -f /slot2/data/domain/f/fastmailtest.com/t/user/testuser/TestReconstruct/8.
> root at test1:/slot2/meta/domain/f/fastmailtest.com/t/user/testuser/TestReconstruct# cyr storet1 reconstruct -k user.testuser.TestReconstruct at fastmailtest.com
> user.testuser.TestReconstruct at fastmailtest.com
> root at test1:/slot2/meta/domain/f/fastmailtest.com/t/user/testuser/TestReconstruct# /home/mod_perl/hm/utils/oneoff/index_uids.pl cyrus.expunge
> V:10 E:4 U:8
> 3 a2da2791a37c6ad82b89b5be527c6b8a0d024c22 4115
> 25 b11b4f6b57f0c81651402e0de06c6d7bb23dd0ff 3898
> 26 0a15656dd6181d590949abc8e219e04b3d46751d 30666
> 23 5a2fe827320f07a731d511be942c472e4213be6f 3957
> 
> ================================================================================================
> 
> 
> The second patch is just a "write the entire header rather than just a couple of
> fields" change to the index upgrade path.  You may not want to include that in
> this release since it's not a functionality change and what's there now works
> fine... but I just thought I should throw it out there for review.
> 
> Bron.
> 


-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University


More information about the Cyrus-devel mailing list