go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
186 stars 48 forks source link

Add shared cache, some small fixes #33

Closed blind-oracle closed 5 years ago

blind-oracle commented 5 years ago

Problem: if we're uploading to 2+ Clickhouse servers from a single carbon-clickhouse instance - we are inherently caching tree/series/tags 2+ times in memory, which sucks.

This PR adds an ability to specify a global cache bucket for a table, which will be shared between the tables and effectively cache only one copy of the data.

By default it's empty which is a backwards-compatible setting.

Also:

lomik commented 5 years ago

Some build fixes: currently you cannot do gox-build on non-linux-amd64 machines due to use of the binary to generate default config. Just put empty config file instead.

I will think about this problem separately. Please remove this fix from PR, it is backward incompatible. This code is used in release process by packages.sh script

lomik commented 5 years ago

Version bump

Don't do this please. Before release, I want to return the Date column to graphite_tree table as backward compatibility option

lomik commented 5 years ago

This PR adds an ability to specify a global cache bucket for a table, which will be shared between the tables and effectively cache only one copy of the data.

If the metric has been inserted into the table A, it will not be inserted into the table B. What's the point of this?