Herb He
07/11/2024, 4:33 AMSHOW CREATE TABLE logs
Query id: 0affbaf0-0688-4d18-b7cf-e08c9052139c
┌─statement──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE signoz_logs.logs
(
`timestamp` UInt64 CODEC(DoubleDelta, LZ4),
`observed_timestamp` UInt64 CODEC(DoubleDelta, LZ4),
`id` String CODEC(ZSTD(1)),
`trace_id` String CODEC(ZSTD(1)),
`span_id` String CODEC(ZSTD(1)),
`trace_flags` UInt32,
`severity_text` LowCardinality(String) CODEC(ZSTD(1)),
`severity_number` UInt8,
`body` String CODEC(ZSTD(2)),
`resources_string_key` Array(String) CODEC(ZSTD(1)),
`resources_string_value` Array(String) CODEC(ZSTD(1)),
`attributes_string_key` Array(String) CODEC(ZSTD(1)),
`attributes_string_value` Array(String) CODEC(ZSTD(1)),
`attributes_int64_key` Array(String) CODEC(ZSTD(1)),
`attributes_int64_value` Array(Int64) CODEC(ZSTD(1)),
`attributes_float64_key` Array(String) CODEC(ZSTD(1)),
`attributes_float64_value` Array(Float64) CODEC(ZSTD(1)),
`attributes_bool_key` Array(String) CODEC(ZSTD(1)),
`attributes_bool_value` Array(Bool) CODEC(ZSTD(1)),
INDEX body_idx body TYPE tokenbf_v1(10240, 3, 0) GRANULARITY 4,
INDEX id_minmax id TYPE minmax GRANULARITY 1,
INDEX severity_number_idx severity_number TYPE set(25) GRANULARITY 4,
INDEX severity_text_idx severity_text TYPE set(25) GRANULARITY 4,
INDEX trace_flags_idx trace_flags TYPE bloom_filter GRANULARITY 4
)
ENGINE = MergeTree
PARTITION BY toDate(timestamp / 1000000000)
ORDER BY (timestamp, id)
TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(432000)
SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 │
Srikanth Chekuri
07/11/2024, 6:27 AMschemaMigrator:
enableReplication: true
Herb He
07/11/2024, 2:21 PMHerb He
07/11/2024, 2:32 PMHerb He
07/11/2024, 3:35 PMDarren Smith
07/11/2024, 4:53 PMDarren Smith
07/11/2024, 4:54 PMSrikanth Chekuri
07/12/2024, 3:49 AMAnd one issue related with DB migration is when CH is being configured to 2 replicas, the DB migration will just stuck and I suspect it’s because the migration is not running on the same Clickhouse instance and being load balanced between 2 replicas and cause issue. I end up change Clickhouse replica number to 1 and run the migration. Then increase it to 2.This shouldn't be the case because we have number of instances run this fine. However, will take a look.