Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dbnode] Remove coldwrites error message until feature is ready #1651

Merged
merged 5 commits into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/dbnode/storage/errors/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ var (
ErrTooPast = xerrors.NewInvalidParamsError(errors.New("datapoint is too far in the past"))

// ErrColdWritesNotEnabled is returned when cold writes are disabled
// and a write is too far in the past or future.
// and a write is too far in the past or future. Note, the error intentionally
// excludes anything regarding the cold writes feature until it's release.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/it's/its

ErrColdWritesNotEnabled = xerrors.NewInvalidParamsError(errors.New(
"cold writes not enabled and datapoint is too far in the past or future"))
"datapoint is too far in the past or future"))
)

// NewUnknownNamespaceError returns a new error indicating an unknown namespace parameter.
Expand Down
5 changes: 3 additions & 2 deletions src/dbnode/storage/series/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/m3db/m3/src/dbnode/clock"
"github.com/m3db/m3/src/dbnode/digest"
"github.com/m3db/m3/src/dbnode/encoding"
"github.com/m3db/m3/src/dbnode/namespace"
"github.com/m3db/m3/src/dbnode/persist"
"github.com/m3db/m3/src/dbnode/storage/block"
m3dberrors "github.com/m3db/m3/src/dbnode/storage/errors"
"github.com/m3db/m3/src/dbnode/namespace"
"github.com/m3db/m3/src/dbnode/ts"
"github.com/m3db/m3/src/dbnode/x/xio"
"github.com/m3db/m3/src/x/context"
Expand Down Expand Up @@ -79,7 +79,7 @@ type databaseBuffer interface {
id ident.ID,
tags ident.Tags,
persistFn persist.DataFn,
nsCtx namespace.Context,
nsCtx namespace.Context,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was poorly formatted before.

) error

Flush(
Expand Down Expand Up @@ -246,6 +246,7 @@ func (b *dbBuffer) Write(
writeType := b.ResolveWriteType(timestamp, now)

if writeType == ColdWrite {

if !b.coldWritesEnabled {
return false, m3dberrors.ErrColdWritesNotEnabled
}
Expand Down