jaegertracing / jaeger-clickhouse

Jaeger ClickHouse storage plugin implementation
Apache License 2.0
247 stars 51 forks source link

Decide on sharding function for distribbuted table #35

Open pavolloffay opened 3 years ago

pavolloffay commented 3 years ago

The distributed table could be created with multiple sharding functions: rand(), cityHash64(traceID) - see https://clickhouse.tech/docs/en/sql-reference/functions/hash-functions/.

The hash functions take an argument, we should consider using traceID to keep data from a single trace in the same location.

CREATE TABLE IF NOT EXISTS jaeger_spans AS jaeger_spans_local ENGINE = Distributed('{cluster}', default, jaeger_spans_local, cityHash64(traceID));
pavolloffay commented 3 years ago

@chhetripradeep would you like to take this on and run some tests on your deployment?

chhetripradeep commented 3 years ago

Sure.