add missing intervals

fix https://github.com/chrislusf/seaweedfs/issues/774
This commit is contained in:
Chris Lu
2018-11-21 16:25:13 -08:00
parent c9b3ef58de
commit e5ad2223a1
2 changed files with 19 additions and 1 deletions

View File

@@ -127,6 +127,7 @@ func mergeIntoVisibles(visibles, newVisibles []*visibleInterval, chunk *filer_pb
return append(visibles, newV)
}
logPrintf(" before", visibles)
for _, v := range visibles {
if v.start < chunk.Offset && chunk.Offset < v.stop {
newVisibles = append(newVisibles, newVisibleInterval(
@@ -145,7 +146,7 @@ func mergeIntoVisibles(visibles, newVisibles []*visibleInterval, chunk *filer_pb
v.modifiedTime,
))
}
if chunkStop < v.start || v.stop <= chunk.Offset {
if chunkStop <= v.start || v.stop <= chunk.Offset {
newVisibles = append(newVisibles, v)
}
}