Skip to content

Commit

Permalink
Fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Nov 10, 2020
1 parent c20adea commit 0a6eb31
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/dbnode/persist/fs/index_claims_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/m3db/m3/src/dbnode/namespace"
"github.com/m3db/m3/src/x/ident"

"github.com/stretchr/testify/require"
)

func TestIndexClaimsManagerConcurrentClaims(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion src/dbnode/persist/fs/index_read_segments.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package fs

import (
"errors"
"fmt"
"io"

"github.com/m3db/m3/src/m3ninx/index/segment"
Expand Down Expand Up @@ -120,7 +121,7 @@ func ReadIndexSegments(
// Note: need to validate after all segment file sets read.
if validate {
if err = reader.Validate(); err != nil {
return ReadIndexSegmentsResult{}, err
return ReadIndexSegmentsResult{}, fmt.Errorf("failed to validate index segments: %w", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/storage/bootstrap/bootstrapper/persist.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func persistBootstrapIndexSegment(
blockStart,
)
if err != nil {
return result.IndexBlock{}, err
return result.IndexBlock{}, fmt.Errorf("failed to claim next index volume index: %w", err)
}

preparedPersist, err := flush.PrepareIndex(persist.IndexPrepareOptions{
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/storage/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ func (i *nsIndex) flushBlock(
indexBlock.StartTime(),
)
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to claim next index volume index: %w", err)
}

preparedPersist, err := flush.PrepareIndex(persist.IndexPrepareOptions{
Expand Down

0 comments on commit 0a6eb31

Please sign in to comment.