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] Log namespace and shard upon invalid series read/write count #3092

Merged
merged 2 commits into from
Jan 15, 2021
Merged
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions src/dbnode/storage/shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,8 @@ func (s *dbShard) purgeExpiredSeries(expiredEntries []*lookup.Entry) {
// The contract requires all entries to have count >= 1.
if count < 1 {
s.logger.Error("purgeExpiredSeries encountered invalid series read/write count",
zap.String("namespace", s.namespace.ID().String()),
Copy link
Collaborator

@soundvibe soundvibe Jan 15, 2021

Choose a reason for hiding this comment

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

nit: probably using zap.Stringer would be better instead of calling String() methods directly. Same applies for series param.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, switched to zap.Stringer. Can you approve it?

zap.Uint32("shard", s.ID()),
zap.String("series", series.ID().String()),
zap.Int32("readerWriterCount", count))
continue
Expand Down