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

Implement combined retentions with backward compatibility #110

Merged
merged 13 commits into from
Aug 7, 2019

Conversation

Felixoid
Copy link
Member

@Felixoid Felixoid commented Mar 8, 2019

This PR implements feature from ClickHouse/ClickHouse#4426:

Retention and Aggregation patterns now could be described separately.

@Felixoid Felixoid requested a review from AndreevDm March 8, 2019 09:53
@Felixoid Felixoid force-pushed the combined_rollup branch 2 times, most recently from 1aa86ab to 4b7e2ab Compare March 8, 2019 12:25
@Felixoid Felixoid force-pushed the combined_rollup branch 4 times, most recently from c83b9f5 to 79ee489 Compare May 12, 2019 13:52
@Felixoid
Copy link
Member Author

/ping

Copy link
Contributor

@AndreevDm AndreevDm left a comment

Choose a reason for hiding this comment

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

Что надо поправить архитектурно:

  1. Не складывать в MetricRetention паттерны, они не должны выходить за пределы RetentionProvider
  2. Не пытаться складывать готовые MetricRetention в List, и потом проходить по нему в поиске нужного Retention. Это приведет к тому, что количество проверяемых будет перемножаться. Нет ничего страшного в создании нового объекта MetricRetention каждую метрику, дерево всё равно кешируемое и будет вычищаться из памяти. Прикапывать их в теории тоже можно, но я предлагаю сейчас на это вообще не заморачиваться. Кроме того вся эта конструкция сейчас не ThreadSafe.

@Felixoid
Copy link
Member Author

Felixoid commented Aug 1, 2019

Что надо поправить архитектурно:

1. Не складывать в MetricRetention паттерны, они не должны выходить за пределы RetentionProvider

2. Не пытаться складывать готовые MetricRetention в List, и потом проходить по нему в поиске нужного Retention. Это приведет к тому, что количество проверяемых будет перемножаться. Нет ничего страшного в создании нового объекта MetricRetention каждую метрику, дерево всё равно кешируемое и будет вычищаться из памяти. Прикапывать их в теории тоже можно, но я предлагаю сейчас на это вообще не заморачиваться. Кроме того вся эта конструкция сейчас не ThreadSafe.

Распилил на два класса, тесты адаптировал

@Felixoid Felixoid merged commit 3d99504 into master Aug 7, 2019
@Felixoid Felixoid deleted the combined_rollup branch August 7, 2019 22:32
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.

2 participants