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

[Question] Can it be changed to a configurable item #980

Open
wlin20 opened this issue May 25, 2023 · 6 comments
Open

[Question] Can it be changed to a configurable item #980

wlin20 opened this issue May 25, 2023 · 6 comments
Labels
question Further information is requested

Comments

@wlin20
Copy link
Contributor

wlin20 commented May 25, 2023

Question

由于 HistoryJpaDatabaseDataStorage.MAX_HISTORY_TABLE_RECORD ( private static final int MAX_HISTORY_TABLE_RECORD = 20_000; )的限制,

使用jpa或者mysql存储数据时,最大历史条数只能有20000条。导致历史记录只能记录很短的一个时间范围,能否把这个改成可配置项,由用户决定最大条数。

@wlin20 wlin20 added the question Further information is requested label May 25, 2023
@hertzbeat hertzbeat changed the title [Question] 能否改成可配置项 [Question] Can it be changed to a configurable item May 25, 2023
@tomsun28
Copy link
Contributor

hi 这里故意限制的,如果不限制存入H2数据库指标数据量,很容易因为数据库性能问题奔溃。所以我们文档都是建议大家使用配置时序数据库来存储指标数据,时序数据库无限制。

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


hi This is intentionally limited. If you do not limit the amount of index data stored in the H2 database, it is easy to crash due to database performance problems. Therefore, our documents recommend that you use the configuration time series database to store indicator data, and there is no limit to the time series database.

@wlin20
Copy link
Contributor Author

wlin20 commented May 25, 2023

有猜到限制的用意。
但对于mysql来说,以当前历史表结构,百万条数据以内应该都不足以构成性能问题。20000的限制还是有点太小了。
建议是可以配置,在配置项中注明风险,让使用者谨慎更改。

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


There is an intention to guess the limit.
But for mysql, with the current historical table structure, less than one million pieces of data should not be enough to constitute a performance problem. The limit of 20000 is still a bit too small.
The suggestion is that it can be configured, and the risk is indicated in the configuration item, so that users can change it carefully.

@tomsun28
Copy link
Contributor

嗯嗯 可以提供一个配置项啥的让用户自己配置,有兴趣实现这个贡献一波PR吗

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hmm, you can provide a configuration item for users to configure by themselves, are you interested in realizing this and contributing a wave of PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants