Skip to content

Guard against negative dataLength while reading a page#763

Merged
joe-elliott merged 3 commits intografana:mainfrom
joe-elliott:corrupt-wal
Jun 14, 2021
Merged

Guard against negative dataLength while reading a page#763
joe-elliott merged 3 commits intografana:mainfrom
joe-elliott:corrupt-wal

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott commented Jun 14, 2021

What this PR does:
Adds guard code against a negative page length. This issue appears to occur when an ingester undergoes an unexpected shutdown. Details in issue.

Which issue(s) this PR fixes:
Fixes #752

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Joe Elliott <number101010@gmail.com>
@joe-elliott joe-elliott merged commit e133d0d into grafana:main Jun 14, 2021
joe-elliott added a commit that referenced this pull request Jun 14, 2021
* Added guard code

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* test

Signed-off-by: Joe Elliott <number101010@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: runtime error: slice bounds out of range [:-6] after upgrade v1.0

2 participants