Skip to content

Revert "Revert "Add metrics for part number in MergeTree in ClickHouse""#18955

Closed
alexey-milovidov wants to merge 3 commits intomasterfrom
revert-18834-revert-17838-dev/add_metrics_for_parts
Closed

Revert "Revert "Add metrics for part number in MergeTree in ClickHouse""#18955
alexey-milovidov wants to merge 3 commits intomasterfrom
revert-18834-revert-17838-dev/add_metrics_for_parts

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Reverts #18834

Revive changes that were reverted due to instable test.

Changelog category:

  • Not for changelog.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 11, 2021
@alexey-milovidov alexey-milovidov marked this pull request as draft January 11, 2021 20:24
Comment on lines +8 to +10
M(Parts, "Total number of data parts") \
M(PartsActive, "Number of active data parts") \
M(PartsInactive, "Number of inactive data parts") \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was recently thought about these metrics and maybe it worth track separate counters for wide/compact/memory parts? (since limits for number of in-memory parts should be different)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it will be useful. BTW, you can create another PR that will include this PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I will take a look at this later. Since I want to rethink some code around, in particular, max_partitions_per_insert_block for in-memory data parts 100 does not looks like good threshold

@alexey-milovidov alexey-milovidov marked this pull request as ready for review January 14, 2021 17:18
@alexey-milovidov
Copy link
Copy Markdown
Member Author

The test does not work even with infinite retries.
Something is wrong with consistency of these metrics?

BTW, I don't like the idea to maintaining the consistency manually.
Maybe better to move them to AsynchronousMetrics?

@alexey-milovidov
Copy link
Copy Markdown
Member Author

But it will be inefficient for large number of data parts.

@alexey-milovidov
Copy link
Copy Markdown
Member Author

There is already MergeTreeData::getPartsCount() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants