Skip to content

Commit

Permalink
Merge pull request #34 from embano1/issue-33
Browse files Browse the repository at this point in the history
fix: Return -1 on Write error
  • Loading branch information
Michael Gasch authored Feb 8, 2022
2 parents eea78ea + 95b7e05 commit d374463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sharded/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (l *Log) Write(ctx context.Context, key []byte, data []byte) (memlog.Offset

offset, err := l.shards[shard].Write(ctx, data)
if err != nil {
return offset, fmt.Errorf("write to shard: %w", err)
return -1, fmt.Errorf("write to shard: %w", err)
}

return offset, nil
Expand Down

0 comments on commit d374463

Please sign in to comment.