Herb He
09/26/2024, 2:26 AMnitya-signoz
09/26/2024, 4:12 AMHerb He
09/26/2024, 5:57 AMnitya-signoz
09/26/2024, 5:58 AMHerb He
09/26/2024, 5:58 AMnitya-signoz
09/26/2024, 5:59 AMHerb He
09/26/2024, 5:59 AM--use-logs-new-schema=false
then signoz query service will try search logs on both old and new tables?nitya-signoz
09/26/2024, 6:00 AMnitya-signoz
09/26/2024, 6:00 AMnitya-signoz
09/26/2024, 6:01 AMHerb He
09/26/2024, 6:02 AMHerb He
09/26/2024, 6:03 AMnitya-signoz
09/26/2024, 6:04 AMHerb He
09/26/2024, 6:06 AMnitya-signoz
09/26/2024, 6:07 AMHerb He
09/26/2024, 6:09 AMnitya-signoz
09/26/2024, 6:12 AMnitya-signoz
09/26/2024, 6:12 AMHerb He
09/26/2024, 6:13 AMnitya-signoz
09/26/2024, 6:13 AMHerb He
09/26/2024, 6:16 AMnitya-signoz
09/26/2024, 6:17 AMHerb He
09/26/2024, 6:18 AMHerb He
10/07/2024, 2:44 AMnitya-signoz
10/07/2024, 12:27 PMnitya-signoz
10/07/2024, 12:28 PMHerb He
10/07/2024, 1:28 PMnitya-signoz
10/07/2024, 2:49 PMHerb He
10/08/2024, 6:42 AM{"level":"info","timestamp":"2024-10-08T06:36:09.449Z","caller":"signozschemamigrator/migrate.go:89","msg":"Setting env var SIGNOZ_CLUSTER","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-10-08T06:36:09.449Z","caller":"signozschemamigrator/migrate.go:106","msg":"Successfully set env var SIGNOZ_CLUSTER ","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-10-08T06:36:09.449Z","caller":"signozschemamigrator/migrate.go:111","msg":"Setting env var SIGNOZ_REPLICATED","component":"migrate cli","replication":true}
{"level":"info","timestamp":"2024-10-08T06:36:09.460Z","caller":"migrationmanager/manager.go:76","msg":"Running migrations for all migrators","component":"migrationmanager"}
{"level":"info","timestamp":"2024-10-08T06:36:09.460Z","caller":"migrationmanager/manager.go:78","msg":"Running migrations for logs","component":"migrationmanager","migrator":"logs"}
{"level":"error","timestamp":"2024-10-08T06:39:10.463Z","caller":"migrationmanager/manager.go:81","msg":"Failed to run migrations for migrator","component":"migrationmanager","migrator":"logs","error":"failed to create database, err: code: 159, message: Watching task /clickhouse/signoz-clickhouse/task_queue/ddl/query-0000000554 is executing longer than distributed_ddl_task_timeout (=180) seconds. There are 2 unfinished hosts (0 of them are currently executing the task), they are going to execute the query in background","stacktrace":"<http://github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate|github.com/SigNoz/signoz-otel-collector/migrationmanager.(*MigrationManager).Migrate>\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/migrationmanager/manager.go:81\nmain.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:126\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}
{"level":"fatal","timestamp":"2024-10-08T06:39:10.463Z","caller":"signozschemamigrator/migrate.go:128","msg":"Failed to run migrations","component":"migrate cli","error":"failed to create database, err: code: 159, message: Watching task /clickhouse/signoz-clickhouse/task_queue/ddl/query-0000000554 is executing longer than distributed_ddl_task_timeout (=180) seconds. There are 2 unfinished hosts (0 of them are currently executing the task), they are going to execute the query in background","stacktrace":"main.main\n\t/home/runner/work/signoz-otel-collector/signoz-otel-collector/cmd/signozschemamigrator/migrate.go:128\nruntime.main\n\t/opt/hostedtoolcache/go/1.21.13/x64/src/runtime/proc.go:267"}
{"level":"info","timestamp":"2024-10-08T06:39:25.333Z","caller":"signozschemamigrator/migrate.go:89","msg":"Setting env var SIGNOZ_CLUSTER","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-10-08T06:39:25.333Z","caller":"signozschemamigrator/migrate.go:106","msg":"Successfully set env var SIGNOZ_CLUSTER ","component":"migrate cli","cluster-name":"cluster"}
{"level":"info","timestamp":"2024-10-08T06:39:25.333Z","caller":"signozschemamigrator/migrate.go:111","msg":"Setting env var SIGNOZ_REPLICATED","component":"migrate cli","replication":true}
{"level":"info","timestamp":"2024-10-08T06:39:25.349Z","caller":"migrationmanager/manager.go:76","msg":"Running migrations for all migrators","component":"migrationmanager"}
{"level":"info","timestamp":"2024-10-08T06:39:25.350Z","caller":"migrationmanager/manager.go:78","msg":"Running migrations for logs","component":"migrationmanager","migrator":"logs"}
nitya-signoz
10/08/2024, 6:53 AMselect * from system.distributed_ddl_queue where status!='Finished';
Herb He
10/08/2024, 6:54 AM┌─entry────────────┬─entry_version─┬─initiator_host───────────────────────────────────────────────────────────────────────────────────┬─initiator_port─┬─cluster─┬─query─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─settings───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───query_create_time─┬─host──────────────────────────────┬─port─┬─status───┬─exception_code─┬─exception_text─┬─query_finish_time─┬─query_duration_ms─┐
│ query-0000000559 │ 5 │ chi-signoz-clickhouse-cluster-0-1-0.chi-signoz-clickhouse-cluster-0-1.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID '0b19e66e-4dbd-4aef-b1d8-c499c315658b' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:41:30 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000559 │ 5 │ chi-signoz-clickhouse-cluster-0-1-0.chi-signoz-clickhouse-cluster-0-1.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID '0b19e66e-4dbd-4aef-b1d8-c499c315658b' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:41:30 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000558 │ 5 │ chi-signoz-clickhouse-cluster-0-1-0.chi-signoz-clickhouse-cluster-0-1.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID 'dfdf0738-30dc-4ec0-915b-718c9f819c4c' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:40:00 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000558 │ 5 │ chi-signoz-clickhouse-cluster-0-1-0.chi-signoz-clickhouse-cluster-0-1.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID 'dfdf0738-30dc-4ec0-915b-718c9f819c4c' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:40:00 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000557 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_logs UUID '4e6f68a5-a258-426d-9ce9-7c202d4f5d46' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:39:25 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000557 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_logs UUID '4e6f68a5-a258-426d-9ce9-7c202d4f5d46' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:39:25 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000556 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID 'e8a2d4c8-a7e6-4c6d-97e2-4b6ec9d153dc' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:38:30 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000556 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID 'e8a2d4c8-a7e6-4c6d-97e2-4b6ec9d153dc' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:38:30 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000555 │ 5 │ chi-signoz-clickhouse-cluster-0-1-0.chi-signoz-clickhouse-cluster-0-1.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_traces UUID 'ec3d8cfd-c44c-49eb-90fa-c00f51fbfb74' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:37:00 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
Herb He
10/08/2024, 6:55 AMHerb He
10/08/2024, 6:55 AMHerb He
10/08/2024, 7:02 AMnitya-signoz
10/08/2024, 7:10 AMIF NOT EXISTS
clause so it won’t cause the issue.
if you see the active ones, recent calls to modify retention(TTL) are active, let them finish ?
│ query-0000000549 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ ALTER TABLE signoz_logs.logs ON CLUSTER cluster MODIFY TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(604800) │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','distributed_ddl_task_timeout':'-1','max_bytes_to_read':'2000000000000','max_execution_time':'600','max_execution_time_leaf':'600','timeout_before_checking_execution_speed':'5','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:27:32 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000549 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ ALTER TABLE signoz_logs.logs ON CLUSTER cluster MODIFY TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(604800) │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','distributed_ddl_task_timeout':'-1','max_bytes_to_read':'2000000000000','max_execution_time':'600','max_execution_time_leaf':'600','timeout_before_checking_execution_speed':'5','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:27:32 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000548 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ ALTER TABLE signoz_logs.logs ON CLUSTER cluster MODIFY TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(864000) │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','distributed_ddl_task_timeout':'-1','max_bytes_to_read':'2000000000000','max_execution_time':'600','max_execution_time_leaf':'600','timeout_before_checking_execution_speed':'5','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:09:14 │ chi-signoz-clickhouse-cluster-0-0 │ 9000 │ Active │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
│ query-0000000548 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ ALTER TABLE signoz_logs.logs ON CLUSTER cluster MODIFY TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(864000) │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','distributed_ddl_task_timeout':'-1','max_bytes_to_read':'2000000000000','max_execution_time':'600','max_execution_time_leaf':'600','timeout_before_checking_execution_speed':'5','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:09:14 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Active │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
Herb He
10/08/2024, 7:12 AMHerb He
10/08/2024, 7:14 AM│ query-0000000554 │ 5 │ chi-signoz-clickhouse-cluster-0-0-0.chi-signoz-clickhouse-cluster-0-0.platform.svc.cluster.local │ 9000 │ cluster │ CREATE DATABASE IF NOT EXISTS signoz_logs UUID '5a5ce4f2-ec65-4a4f-9793-9850f59def3a' ON CLUSTER cluster │ {'connect_timeout_with_failover_ms':'1000','distributed_aggregation_memory_efficient':'1','log_queries':'1','parallel_view_processing':'1','max_table_size_to_drop':'0','max_partition_size_to_drop':'0','allow_nondeterministic_mutations':'1','allow_experimental_window_functions':'1','default_database_engine':'Ordinary'} │ 2024-10-08 06:36:09 │ chi-signoz-clickhouse-cluster-0-1 │ 9000 │ Inactive │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
nitya-signoz
10/08/2024, 7:15 AMHerb He
10/08/2024, 7:15 AMnitya-signoz
10/08/2024, 7:21 AMHerb He
10/08/2024, 7:22 AM-- show create table logs to get the original schema and create a replicated_logs table from it
CREATE TABLE signoz_logs.replicated_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 = ReplicatedReplacingMergeTree('/clickhouse/tables/{cluster}/logs', '{replica}')
PARTITION BY toDate(timestamp / 1000000000)
ORDER BY (timestamp, id)
TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(432000)
SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1
-- Prepare for attach all shards
SELECT DISTINCT concat('ALTER TABLE replicated_logs ATTACH PARTITION ID \'', partition_id, '\' FROM logs;')
FROM system.parts
WHERE (table = 'logs') AND active;
-- Result
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240706' FROM logs;
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240707' FROM logs;
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240708' FROM logs;
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240709' FROM logs;
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240710' FROM logs;
ALTER TABLE replicated_logs ATTACH PARTITION ID '20240711' FROM logs;
-- Check count for the source table
SELECT count(1) FROM logs;
-- Check count for the destination table
SELECT count(1) FROM replicated_logs;
-- Rename and redirect traffic
RENAME TABLE logs TO logs_old, replicated_logs TO logs;
-- Cleanup
DROP TABLE logs_old;
nitya-signoz
10/08/2024, 7:24 AMHerb He
10/08/2024, 7:25 AMnitya-signoz
10/08/2024, 7:27 AMHerb He
10/08/2024, 7:28 AMsignoz/signoz-schema-migrator
image version from 0.102.2
to 0.102.10
. is it related?Herb He
10/08/2024, 8:06 AMON CLUSTER cluster;
I manually run the create database query with on cluster it just hangs. But if I removed the on cluster it can finished immediatelyHerb He
10/08/2024, 11:38 AMselect * from system.mutations;
The mutation is like materialize ttl
on some old log partitions. Not sure why they stuck for very long time. I manually kill them through this KILL MUTATION WHERE database = 'signoz_logs' AND table = 'logs' AND mutation_id IN ('<id1>', '<id2>');
and then select * from system.distributed_ddl_queue where status!='Finished';
is empty now. Then I run the migration and all works as expected. cc @nitya-signoznitya-signoz
10/08/2024, 11:40 AMHerb He
10/08/2024, 11:41 AMHerb He
10/09/2024, 3:06 AM┌─name────────────────────────────┐
│ attribute_keys_bool_final_mv │
│ attribute_keys_float64_final_mv │
│ attribute_keys_string_final_mv │
│ distributed_logs │
│ distributed_logs_attribute_keys │
│ distributed_logs_resource_keys │
│ distributed_logs_v2 │
│ distributed_logs_v2_resource │
│ distributed_tag_attributes │
│ distributed_usage │
│ logs │
│ logs_attribute_keys │
│ logs_resource_keys │
│ logs_v2 │
│ logs_v2_resource │
│ resource_keys_string_final_mv │
│ schema_migrations │
│ tag_attributes │
│ usage │
└─────────────────────────────────┘
Herb He
10/09/2024, 3:55 AMHerb He
10/09/2024, 3:57 AM1727734329218044625
which is 10/1, but we still can’t see logs in the SigNoz UI in the time window 10/2 - 10/7nitya-signoz
10/09/2024, 4:25 AMlogs
table.nitya-signoz
10/09/2024, 4:28 AMquery-service:
command:
[
"-config=/root/config/prometheus.yml",
"--use-logs-new-schema=true"
]
Herb He
10/09/2024, 4:30 AMdistributed_logs_v2_resource
table it’s missing most of our cluster’s log but only contain 1 cluster logs. not sure what’s causing this.Herb He
10/09/2024, 4:30 AMHerb He
10/09/2024, 4:31 AMDid you make this change for query-service ?Yes I do.
nitya-signoz
10/09/2024, 4:32 AMHerb He
10/09/2024, 4:34 AMnitya-signoz
10/09/2024, 4:40 AMSELECT
toStartOfInterval(fromUnixTimestamp64Nano(timestamp), toIntervalHour(1)) AS ts,
toFloat64(count(*)) AS value
FROM signoz_logs.distributed_logs_v2
WHERE (timestamp >= toInt64(now64()-toIntervalHour(70)) * 1e9)
GROUP BY ts
ORDER BY value DESC
SELECT
toStartOfInterval(fromUnixTimestamp64Nano(timestamp), toIntervalHour(1)) AS ts,
toFloat64(count(*)) AS value
FROM signoz_logs.distributed_logs
WHERE (timestamp >= toInt64(now64()-toIntervalHour(70)) * 1e9)
GROUP BY ts
ORDER BY value DESC
Then you can follow this guide https://clickhouse.com/docs/en/sql-reference/statements/alter/partition, or delete using where clause https://clickhouse.com/docs/en/sql-reference/statements/deleteHerb He
10/09/2024, 4:43 AMnitya-signoz
10/09/2024, 4:45 AMHerb He
10/09/2024, 4:49 AMnitya-signoz
10/09/2024, 4:50 AMexporters:
clickhouselogsexporter:
use_new_schema: false
Herb He
10/09/2024, 4:51 AMnitya-signoz
10/09/2024, 4:52 AMHerb He
10/09/2024, 4:54 AMnitya-signoz
10/09/2024, 4:54 AMHerb He
10/09/2024, 4:55 AMdistributed_logs_v2
logs_v2
logs_v2_resource
distributed_logs_v2_resource
nitya-signoz
10/09/2024, 5:20 AMnitya-signoz
10/10/2024, 5:16 AMHerb He
10/10/2024, 5:18 AM