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

Experimental TSDB index #5376

Merged
merged 14 commits into from
Feb 15, 2022
Merged

Experimental TSDB index #5376

merged 14 commits into from
Feb 15, 2022

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Feb 11, 2022

This PR retrofits TSDB for use with Loki. This is highly experimental and unused by the rest of the project, but can be used as foundations for a slimmer, more tailored index.

All the commits are standalone and I suggest reviewers approach them one at a time.

@owen-d owen-d requested a review from a team as a code owner February 11, 2022 21:26
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-d
Copy link
Member Author

owen-d commented Feb 15, 2022

I also added tsdb testware and the small diff from the only commit we were missing: prometheus/prometheus#9766

@owen-d owen-d merged commit 1837c9e into grafana:main Feb 15, 2022
Copy link
Contributor

@cstyan cstyan left a comment

Choose a reason for hiding this comment

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

Got to this a bit late. I have to say, the commit structure is great, I'll be making an effort to do similar going forward. Given that we're only really using this via tests ATM I only had one comment.

I also have one question; can you confirm which commit you copied tsdb/index and tsdb/querier from, and that you only modified tsdb/index? I see that in follow up commits, but I don't see any modifications to tsdb/querier yet. Is that correct?

return &Builder{streams: make(map[string]*stream)}
}

func (b *Builder) AddSeries(ls labels.Labels, chks []ChunkMeta) {
Copy link
Contributor

Choose a reason for hiding this comment

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

would AddChunks make more sense?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that would be totally reasonable too. re; commits, thanks! I tried to keep these isolated, but I should have made an initial PR with just the forked code. 262b64b is the forking commit.

@owen-d
Copy link
Member Author

owen-d commented Feb 18, 2022

ref #5428

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.

None yet

3 participants