Skip to content

Commit

Permalink
Merge branch 'master' into ra/less-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Artoul authored Aug 9, 2019
2 parents 0ee93ca + 01a9d46 commit cfa0f0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dbnode/storage/series/series_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package series
import (
"errors"
"io"
"sort"
"testing"
"time"

Expand Down Expand Up @@ -322,6 +323,12 @@ func TestSeriesBootstrapAndLoad(t *testing.T) {
optimizedTimes.ForEach(func(blockStart xtime.UnixNano) {
coldFlushBlockStarts = append(coldFlushBlockStarts, blockStart)
})
// Cold flush block starts don't come back in any particular order so
// sort them for easier comparisons.
sort.Slice(coldFlushBlockStarts, func(i, j int) bool {
return coldFlushBlockStarts[i] < coldFlushBlockStarts[j]
})

if tc.loadOpts.Bootstrap {
// If its a bootstrap then we need to make sure that everything gets loaded as warm/cold writes
// correctly based on the flush state.
Expand Down

0 comments on commit cfa0f0c

Please sign in to comment.