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

deletion: fix issue in processing delete requests with tsdb index #8665

Conversation

sandeepsukhani
Copy link
Contributor

@sandeepsukhani sandeepsukhani commented Mar 1, 2023

What this PR does / why we need it:
When a delete request creates a new chunk from an existing chunk, we index it to the index store.
In TSDB, we drop __name__ label, which was being added to chunkrefs for historical reasons.
However, this was not done while indexing chunks from the deletion code, causing deletion to fail with the error chunk insertion is only allowed on existing streams.

This PR handles the issue by dropping the __name__ label and adding relevant tests.

Special notes for your reviewer:
I will add an integration test for deletion with TSDB once we have PR #7754 merged since it does some groundwork to run integration tests with both boltdb-shipper and tsdb.

Checklist

  • Tests updated
  • CHANGELOG.md updated

@sandeepsukhani sandeepsukhani requested a review from a team as a code owner March 1, 2023 12:03
@sandeepsukhani sandeepsukhani changed the title deletion: drop __name__ label while indexing new chunk in TSDB built while processing delete requests deletion: fix issue in processing delete requests with tsdb index Mar 2, 2023
Copy link
Contributor

@MichelHollands MichelHollands left a comment

Choose a reason for hiding this comment

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

LGTM

@sandeepsukhani sandeepsukhani merged commit 162a2d0 into grafana:main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants