Skip to content

Commit

Permalink
Schema not found on initial schema bootstrap is a valid error.
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Oct 25, 2019
1 parent 4b0dc9f commit f62eccf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dbnode/namespace/schema_registry_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package namespace

import (
"fmt"
"strings"

xerrors "github.com/m3db/m3/src/x/errors"

Expand All @@ -38,7 +39,8 @@ func UpdateSchemaRegistry(newNamespaces Map, schemaReg SchemaRegistry, log *zap.
curSchemaNone = true
)
curSchema, err := schemaReg.GetLatestSchema(metadata.ID())
if err != nil {
// NB(bodu): Schema history not found is a valid error as this occurs on initial bootstrap for the db.
if err != nil && !strings.Contains(err.Error(), "schema history is not found for") {
multiErr = multiErr.Add(fmt.Errorf("cannot get latest namespace schema: %v", err))
continue
}
Expand Down

0 comments on commit f62eccf

Please sign in to comment.