Skip to content

Commit

Permalink
Refactor: optimize auto compute crc
Browse files Browse the repository at this point in the history
Signed-off-by: awzhgw <guowl18702995996@gmail.com>
  • Loading branch information
awzhgw committed Nov 12, 2019
1 parent c4ee0ae commit f9d3ba1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/extent_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ func (s *ExtentStore) AutoComputeExtentCrc() {
if ei == nil {
continue
}
if !IsTinyExtent(ei.FileID) && time.Now().Unix()-ei.ModifyTime > UpdateCrcInterval && ei.IsDeleted == false && ei.Size > 0 {
if !IsTinyExtent(ei.FileID) && time.Now().Unix()-ei.ModifyTime > UpdateCrcInterval &&
ei.IsDeleted == false && ei.Size > 0 && ei.Crc==0{
e, err := s.extentWithHeader(ei)
if err != nil {
continue
Expand Down

0 comments on commit f9d3ba1

Please sign in to comment.