Skip to content

Fix TSDB file meta #2287

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

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Fix TSDB file meta #2287

merged 2 commits into from
Aug 23, 2023

Conversation

kolesnikovae
Copy link
Collaborator

  • Partition symbols #2196 introduced a bug where SeriesNum field of the index file in the meta.json is always zero. This information duplicates BlockStats.NumSeries and is not used anywhere in the read path, however it is better to maintain it for consistency with existing blocks.
  • Added test that validates meta.json generated with head.Flush.
  • A micro optimisation of how tsdb index file is read: io.ReadAll is replaced with io.ReadFull as it allocates less memory.

@kolesnikovae kolesnikovae force-pushed the perf/optimize_tsdb_reading branch from 47b791e to 414fc1a Compare August 22, 2023 07:00
@kolesnikovae kolesnikovae marked this pull request as ready for review August 22, 2023 07:21
@kolesnikovae kolesnikovae requested a review from a team as a code owner August 22, 2023 07:21
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

@kolesnikovae kolesnikovae merged commit 6212903 into next Aug 23, 2023
@kolesnikovae kolesnikovae deleted the perf/optimize_tsdb_reading branch August 23, 2023 00:18
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.

3 participants