Two more patches

Bron Gondwana brong at fastmail.fm
Wed Oct 24 09:46:56 EDT 2007


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.

> > 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

5 deleted messages (deliberately mis-ordered just to make sure it handled
that case fine)

> > 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.

Delete the underlying file for one of them.

> > 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

Reconstruct goes fine.

> > 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

Only 4 records left in .expunge, handily not including the one that's missing
the data file.

Note that UIDNEXT is of course totally bogus in the cyrus.expunge file, but at
least the exists count and version are correct :)

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Cyrus-devel mailing list