hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[Question] why in MetricsDataController injection is a collection of stores instead of a single store instance?

Open xuziyang opened this issue 1 year ago • 3 comments

Question

image

Since only one realtimeDataStore and one historyDataStore can be configured, why in MetricsDataController injection is a collection of stores instead of a single store instance.

I think it's better to inject a single instance. If the community agrees, you can assign this task to me. @tomsun28

xuziyang avatar May 08 '24 03:05 xuziyang

Hi, this is due to historical configuration. Although we can only configure one store, many users will configure multiple ones, or forget to turn off the default one, causing the operation to fail. So here we changed to inject multiple beans and then select one.

I think we can update it to inject only one instance. And we need to discuss whether we need to start reporting errors when there is no bean when startup.

tomsun28 avatar May 08 '24 08:05 tomsun28

Hi, this is due to historical configuration. Although we can only configure one store, many users will configure multiple ones, or forget to turn off the default one, causing the operation to fail. So here we changed to inject multiple beans and then select one.

I think we can update it to inject only one instance. And we need to discuss whether we need to start reporting errors when there is no bean when startup.

from the documentation, it is possible to use only the real-time data storage and not the historical data repository.

since it's expected that no historical data repository is configured, I think it's good to give a warning at system startup if no historical data repository is configured

xuziyang avatar May 08 '24 08:05 xuziyang

ok👍

tomsun28 avatar May 08 '24 08:05 tomsun28