Increase compact revision during each compaction

This commit is contained in:
chrislusf 2015-05-08 23:43:59 -07:00
parent dac3b592ed
commit 66317b8438

View file

@ -65,6 +65,7 @@ func (v *Volume) copyDataAndGenerateIndexFile(dstName, idxName string) (err erro
err = ScanVolumeFile(v.dir, v.Collection, v.Id, v.needleMapKind, err = ScanVolumeFile(v.dir, v.Collection, v.Id, v.needleMapKind,
func(superBlock SuperBlock) error { func(superBlock SuperBlock) error {
superBlock.CompactRevision++
_, err = dst.Write(superBlock.Bytes()) _, err = dst.Write(superBlock.Bytes())
return err return err
}, true, func(n *Needle, offset int64) error { }, true, func(n *Needle, offset int64) error {