diff --git a/benchmarks/bench.toml b/benchmarks/bench.toml index f8dfb18036..be9e50dfc0 100644 --- a/benchmarks/bench.toml +++ b/benchmarks/bench.toml @@ -13,7 +13,7 @@ # limitations under the License. [sst_bench] -store_path = "/tmp/ceresdb/1/1" +store_path = "/tmp/horaedb/1/1" sst_file_name = "37.sst" runtime_thread_num = 1 bench_measurement_time = "30s" @@ -29,7 +29,7 @@ start_time_ms = 1632985200000 end_time_ms = 1632985800000 [merge_sst_bench] -store_path = "/tmp/ceresdb" +store_path = "/tmp/horaedb" space_id = 1 table_id = 1 sst_file_ids = [ 34, 37 ] @@ -45,7 +45,7 @@ end_time_ms = 0 # end_time_ms = 1632985800000 [scan_memtable_bench] -store_path = "/tmp/ceresdb/1/1" +store_path = "/tmp/horaedb/1/1" sst_file_name = "37.sst" runtime_thread_num = 1 max_projections = 5 diff --git a/benchmarks/config/sst.toml b/benchmarks/config/sst.toml index 7dcd41cbd6..2d78639332 100644 --- a/benchmarks/config/sst.toml +++ b/benchmarks/config/sst.toml @@ -15,7 +15,7 @@ runtime_thread_num = 4 [rebuild_sst] -store_path = "/tmp/ceresdb/benchmarks" +store_path = "/tmp/horaedb/benchmarks" input_file_name = "898.sst" read_batch_row_num = 8192 output_file_name = "tt_t.sst" @@ -27,13 +27,13 @@ start_time_ms = 0 end_time_ms = 0 [merge_sst] -store_path = "/tmp/ceresdb/benchmarks/2199023255564" +store_path = "/tmp/horaedb/benchmarks/2199023255564" space_id = 1 table_id = 1 sst_file_ids = [1, 17, 19, 24, 31, 37, 43, 45, 9, 14, 18, 21, 27, 34, 40, 44, 5] dedup = true read_batch_row_num = 16384 -output_store_path = "/tmp/ceresdb/data/1/1" +output_store_path = "/tmp/horaedb/data/1/1" output_file_name = "16384-all.sst" num_rows_per_row_group = 16384 diff --git a/docker/basic.sh b/docker/basic.sh index 3f6e1da0a7..61a6f0146f 100755 --- a/docker/basic.sh +++ b/docker/basic.sh @@ -17,7 +17,7 @@ PORT=${HORAEDB_PORT:-"5440"} URL="http://${ADDR}:${PORT}/sql" -function ceresdb_query { +function horaedb_query { sql=${1} curl --location --fail \ @@ -28,12 +28,12 @@ function ceresdb_query { }' } -ceresdb_query 'CREATE TABLE `demo` (`name` string TAG, `value` double NOT NULL, `t` timestamp NOT NULL, TIMESTAMP KEY(t)) ENGINE=Analytic with (enable_ttl='\''false'\'')' +horaedb_query 'CREATE TABLE `demo` (`name` string TAG, `value` double NOT NULL, `t` timestamp NOT NULL, TIMESTAMP KEY(t)) ENGINE=Analytic with (enable_ttl='\''false'\'')' -ceresdb_query 'INSERT INTO demo(t, name, value) VALUES(1651737067000, '\''horaedb'\'', 100)' +horaedb_query 'INSERT INTO demo(t, name, value) VALUES(1651737067000, '\''horaedb'\'', 100)' -ceresdb_query 'select * from demo' +horaedb_query 'select * from demo' -ceresdb_query 'show create table demo' +horaedb_query 'show create table demo' -ceresdb_query 'DROP TABLE demo' +horaedb_query 'DROP TABLE demo' diff --git a/docs/dockerhub-description.md b/docs/dockerhub-description.md index aa98bd854f..5d3fcd220f 100644 --- a/docs/dockerhub-description.md +++ b/docs/dockerhub-description.md @@ -13,7 +13,8 @@ docker run -d --name horaedb-server \ horaedb/horaedb-server:$(version) ``` -CeresDB will listen three ports when start: +HoraeDB will listen three ports when started: + - 8831, gRPC port - 3307, MySQL port - 5440, HTTP port diff --git a/docs/example-cluster-0.toml b/docs/example-cluster-0.toml index 9f950ea3e6..e4e5b9e96e 100644 --- a/docs/example-cluster-0.toml +++ b/docs/example-cluster-0.toml @@ -31,11 +31,11 @@ mem_cache_partition_bits = 0 [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb0" +data_dir = "/tmp/horaedb0" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb0" +data_dir = "/tmp/horaedb0" [cluster_deployment] mode = "WithMeta" diff --git a/docs/example-cluster-1.toml b/docs/example-cluster-1.toml index b08d3dc7e8..c60c91a6e1 100644 --- a/docs/example-cluster-1.toml +++ b/docs/example-cluster-1.toml @@ -32,11 +32,11 @@ mem_cache_partition_bits = 0 [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb1" +data_dir = "/tmp/horaedb1" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb1" +data_dir = "/tmp/horaedb1" [cluster_deployment] mode = "WithMeta" diff --git a/docs/example-standalone-static-routing.toml b/docs/example-standalone-static-routing.toml index ae216a97d1..6e196fb2bd 100644 --- a/docs/example-standalone-static-routing.toml +++ b/docs/example-standalone-static-routing.toml @@ -34,7 +34,7 @@ write_group_command_channel_cap = 1024 [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb1" +data_dir = "/tmp/horaedb1" [analytic.storage] mem_cache_capacity = '1G' @@ -42,7 +42,7 @@ mem_cache_partition_bits = 0 [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" [analytic.compaction_config] schedule_channel_len = 4 diff --git a/docs/minimal.toml b/docs/minimal.toml index a9af778903..d508bf3dc0 100644 --- a/docs/minimal.toml +++ b/docs/minimal.toml @@ -22,15 +22,15 @@ postgresql_port = 5433 level = "info" [tracing] -dir = "/tmp/ceresdb" +dir = "/tmp/horaedb" [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" [analytic] enable_primary_key_sampling = true diff --git a/integration_tests/cases/env/cluster/config.toml b/integration_tests/cases/env/cluster/config.toml index 4aec15e802..c8edda4bdf 100644 --- a/integration_tests/cases/env/cluster/config.toml +++ b/integration_tests/cases/env/cluster/config.toml @@ -22,19 +22,19 @@ log_level = "debug" read_parallelism = 8 [analytic] -wal_path = "/tmp/ceresdb" +wal_path = "/tmp/horaedb" sst_meta_cache_cap = 10000 [analytic.storage] mem_cache_capacity = '1G' mem_cache_partition_bits = 0 -disk_cache_path = "/tmp/ceresdb" +disk_cache_path = "/tmp/horaedb" disk_cache_capacity = '2G' disk_cache_page_size = '1M' [analytic.storage.object_store] type = "Local" -data_path = "/tmp/ceresdb" +data_path = "/tmp/horaedb" [[meta_client.cluster_view.schema_shards]] schema = 'public' diff --git a/integration_tests/cases/env/cluster/ddl/partition_table.result b/integration_tests/cases/env/cluster/ddl/partition_table.result index e5c81e6de3..e2035d2fed 100644 --- a/integration_tests/cases/env/cluster/ddl/partition_table.result +++ b/integration_tests/cases/env/cluster/ddl/partition_table.result @@ -19,72 +19,72 @@ String("partition_table_t"),String("CREATE TABLE `partition_table_t` (`tsid` uin INSERT INTO partition_table_t (t, name, value) -VALUES (1651737067000, "ceresdb0", 100), - (1651737067000, "ceresdb1", 101), - (1651737067000, "ceresdb2", 102), - (1651737067000, "ceresdb3", 103), - (1651737067000, "ceresdb4", 104), - (1651737067000, "ceresdb5", 105), - (1651737067000, "ceresdb6", 106), - (1651737067000, "ceresdb7", 107), - (1651737067000, "ceresdb8", 108), - (1651737067000, "ceresdb9", 109), - (1651737067000, "ceresdb10", 110); +VALUES (1651737067000, "horaedb0", 100), + (1651737067000, "horaedb1", 101), + (1651737067000, "horaedb2", 102), + (1651737067000, "horaedb3", 103), + (1651737067000, "horaedb4", 104), + (1651737067000, "horaedb5", 105), + (1651737067000, "horaedb6", 106), + (1651737067000, "horaedb7", 107), + (1651737067000, "horaedb8", 108), + (1651737067000, "horaedb9", 109), + (1651737067000, "horaedb10", 110); affected_rows: 11 -SELECT * from partition_table_t where name = "ceresdb0"; +SELECT * from partition_table_t where name = "horaedb0"; tsid,t,name,id,value, -UInt64(7867167026748566913),Timestamp(1651737067000),String("ceresdb0"),Int32(0),Double(100.0), +UInt64(14003629709952370168),Timestamp(1651737067000),String("horaedb0"),Int32(0),Double(100.0), -SELECT * from partition_table_t where name = "ceresdb1"; +SELECT * from partition_table_t where name = "horaedb1"; tsid,t,name,id,value, -UInt64(17529796748086676681),Timestamp(1651737067000),String("ceresdb1"),Int32(0),Double(101.0), +UInt64(16657478399506126519),Timestamp(1651737067000),String("horaedb1"),Int32(0),Double(101.0), -SELECT * from partition_table_t where name = "ceresdb2"; +SELECT * from partition_table_t where name = "horaedb2"; tsid,t,name,id,value, -UInt64(9909398277373623550),Timestamp(1651737067000),String("ceresdb2"),Int32(0),Double(102.0), +UInt64(13157642818866239218),Timestamp(1651737067000),String("horaedb2"),Int32(0),Double(102.0), -SELECT * from partition_table_t where name = "ceresdb3"; +SELECT * from partition_table_t where name = "horaedb3"; tsid,t,name,id,value, -UInt64(5639753573168158607),Timestamp(1651737067000),String("ceresdb3"),Int32(0),Double(103.0), +UInt64(17269220762189063056),Timestamp(1651737067000),String("horaedb3"),Int32(0),Double(103.0), -SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name; +SELECT * from partition_table_t where name in ("horaedb0", "horaedb1", "horaedb2", "horaedb3", "horaedb4") order by name; tsid,t,name,id,value, -UInt64(7867167026748566913),Timestamp(1651737067000),String("ceresdb0"),Int32(0),Double(100.0), -UInt64(17529796748086676681),Timestamp(1651737067000),String("ceresdb1"),Int32(0),Double(101.0), -UInt64(9909398277373623550),Timestamp(1651737067000),String("ceresdb2"),Int32(0),Double(102.0), -UInt64(5639753573168158607),Timestamp(1651737067000),String("ceresdb3"),Int32(0),Double(103.0), -UInt64(1510325626916728375),Timestamp(1651737067000),String("ceresdb4"),Int32(0),Double(104.0), +UInt64(14003629709952370168),Timestamp(1651737067000),String("horaedb0"),Int32(0),Double(100.0), +UInt64(16657478399506126519),Timestamp(1651737067000),String("horaedb1"),Int32(0),Double(101.0), +UInt64(13157642818866239218),Timestamp(1651737067000),String("horaedb2"),Int32(0),Double(102.0), +UInt64(17269220762189063056),Timestamp(1651737067000),String("horaedb3"),Int32(0),Double(103.0), +UInt64(7518868672723248583),Timestamp(1651737067000),String("horaedb4"),Int32(0),Double(104.0), -SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name; +SELECT * from partition_table_t where name in ("horaedb5", "horaedb6", "horaedb7","horaedb8", "horaedb9", "horaedb10") order by name; tsid,t,name,id,value, -UInt64(7158007527379307345),Timestamp(1651737067000),String("ceresdb10"),Int32(0),Double(110.0), -UInt64(12677620772014847982),Timestamp(1651737067000),String("ceresdb5"),Int32(0),Double(105.0), -UInt64(15597124953767983737),Timestamp(1651737067000),String("ceresdb6"),Int32(0),Double(106.0), -UInt64(4263010807109012073),Timestamp(1651737067000),String("ceresdb7"),Int32(0),Double(107.0), -UInt64(9923681778193615344),Timestamp(1651737067000),String("ceresdb8"),Int32(0),Double(108.0), -UInt64(4860320137932382618),Timestamp(1651737067000),String("ceresdb9"),Int32(0),Double(109.0), +UInt64(8750817885369790753),Timestamp(1651737067000),String("horaedb10"),Int32(0),Double(110.0), +UInt64(11618546385801067358),Timestamp(1651737067000),String("horaedb5"),Int32(0),Double(105.0), +UInt64(14251454593639082376),Timestamp(1651737067000),String("horaedb6"),Int32(0),Double(106.0), +UInt64(5459144247315085218),Timestamp(1651737067000),String("horaedb7"),Int32(0),Double(107.0), +UInt64(18050575420545011296),Timestamp(1651737067000),String("horaedb8"),Int32(0),Double(108.0), +UInt64(16367588166920223437),Timestamp(1651737067000),String("horaedb9"),Int32(0),Double(109.0), ALTER TABLE partition_table_t ADD COLUMN (b string); affected_rows: 0 -INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, "ceresdb0", 100); +INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, "horaedb0", 100); -Failed to execute query, err: Server(ServerError { code: 500, msg: "Failed to execute plan. Caused by: Internal error, msg:Failed to execute interpreter, err:Failed to execute insert, err:Failed to write table, err:Failed to write tables in batch, tables:[\"__partition_table_t_1\"], err:Failed to query from table in server, table_idents:[TableIdentifier { catalog: \"horaedb\", schema: \"public\", table: \"__partition_table_t_1\" }], code:401, msg:failed to decode row group payload. Caused by: Schema mismatch with the write request, msg:expect 6 columns, but got 5. sql:INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, \"ceresdb0\", 100);" }) +Failed to execute query, err: Server(ServerError { code: 500, msg: "Failed to execute plan. Caused by: Internal error, msg:Failed to execute interpreter, err:Failed to execute insert, err:Failed to write table, err:Failed to write tables in batch, tables:[\"__partition_table_t_1\"], err:Failed to query from table in server, table_idents:[TableIdentifier { catalog: \"horaedb\", schema: \"public\", table: \"__partition_table_t_1\" }], code:401, msg:failed to decode row group payload. Caused by: Schema mismatch with the write request, msg:expect 6 columns, but got 5. sql:INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, \"horaedb0\", 100);" }) ALTER TABLE partition_table_t MODIFY SETTING enable_ttl='true'; @@ -105,7 +105,7 @@ String("__partition_table_t_1"),String("CREATE TABLE `__partition_table_t_1` (`t SHOW CREATE TABLE __partition_table_t_2; Table,Create Table, -String("__partition_table_t_2"),String("CREATE TABLE `__partition_table_t_2` (`tsid` uint64 NOT NULL, `t` timestamp NOT NULL, `name` string TAG, `id` int TAG, `value` double NOT NULL, `b` string, PRIMARY KEY(tsid,t), TIMESTAMP KEY(t)) ENGINE=Analytic WITH(arena_block_size='2097152', compaction_strategy='default', compression='ZSTD', enable_ttl='true', memtable_type='skiplist', num_rows_per_row_group='8192', segment_duration='', storage_format='AUTO', ttl='7d', update_mode='OVERWRITE', write_buffer_size='33554432')"), +String("__partition_table_t_2"),String("CREATE TABLE `__partition_table_t_2` (`tsid` uint64 NOT NULL, `t` timestamp NOT NULL, `name` string TAG, `id` int TAG, `value` double NOT NULL, `b` string, PRIMARY KEY(tsid,t), TIMESTAMP KEY(t)) ENGINE=Analytic WITH(arena_block_size='2097152', compaction_strategy='default', compression='ZSTD', enable_ttl='true', memtable_type='skiplist', num_rows_per_row_group='8192', segment_duration='2h', storage_format='AUTO', ttl='7d', update_mode='OVERWRITE', write_buffer_size='33554432')"), SHOW CREATE TABLE __partition_table_t_3; @@ -143,30 +143,30 @@ String("random_partition_table_t"),String("CREATE TABLE `random_partition_table_ INSERT INTO random_partition_table_t (t, name, value) -VALUES (1651737067000, "ceresdb0", 100), - (1651737067000, "ceresdb1", 101), - (1651737067000, "ceresdb2", 102), - (1651737067000, "ceresdb3", 103), - (1651737067000, "ceresdb4", 104), - (1651737067000, "ceresdb5", 105), - (1651737067000, "ceresdb6", 106), - (1651737067000, "ceresdb7", 107), - (1651737067000, "ceresdb8", 108), - (1651737067000, "ceresdb9", 109), - (1651737067000, "ceresdb10", 110); +VALUES (1651737067000, "horaedb0", 100), + (1651737067000, "horaedb1", 101), + (1651737067000, "horaedb2", 102), + (1651737067000, "horaedb3", 103), + (1651737067000, "horaedb4", 104), + (1651737067000, "horaedb5", 105), + (1651737067000, "horaedb6", 106), + (1651737067000, "horaedb7", 107), + (1651737067000, "horaedb8", 108), + (1651737067000, "horaedb9", 109), + (1651737067000, "horaedb10", 110); affected_rows: 11 -SELECT * from random_partition_table_t where name = "ceresdb0"; +SELECT * from random_partition_table_t where name = "horaedb0"; tsid,t,name,id,value, -UInt64(7867167026748566913),Timestamp(1651737067000),String("ceresdb0"),Int32(0),Double(100.0), +UInt64(14003629709952370168),Timestamp(1651737067000),String("horaedb0"),Int32(0),Double(100.0), -SELECT * from random_partition_table_t where name = "ceresdb5"; +SELECT * from random_partition_table_t where name = "horaedb5"; tsid,t,name,id,value, -UInt64(12677620772014847982),Timestamp(1651737067000),String("ceresdb5"),Int32(0),Double(105.0), +UInt64(11618546385801067358),Timestamp(1651737067000),String("horaedb5"),Int32(0),Double(105.0), DROP TABLE IF EXISTS `random_partition_table_t`; diff --git a/integration_tests/cases/env/cluster/ddl/partition_table.sql b/integration_tests/cases/env/cluster/ddl/partition_table.sql index 76fc398650..cde29d5a1e 100644 --- a/integration_tests/cases/env/cluster/ddl/partition_table.sql +++ b/integration_tests/cases/env/cluster/ddl/partition_table.sql @@ -11,33 +11,33 @@ CREATE TABLE `partition_table_t`( SHOW CREATE TABLE partition_table_t; INSERT INTO partition_table_t (t, name, value) -VALUES (1651737067000, "ceresdb0", 100), - (1651737067000, "ceresdb1", 101), - (1651737067000, "ceresdb2", 102), - (1651737067000, "ceresdb3", 103), - (1651737067000, "ceresdb4", 104), - (1651737067000, "ceresdb5", 105), - (1651737067000, "ceresdb6", 106), - (1651737067000, "ceresdb7", 107), - (1651737067000, "ceresdb8", 108), - (1651737067000, "ceresdb9", 109), - (1651737067000, "ceresdb10", 110); +VALUES (1651737067000, "horaedb0", 100), + (1651737067000, "horaedb1", 101), + (1651737067000, "horaedb2", 102), + (1651737067000, "horaedb3", 103), + (1651737067000, "horaedb4", 104), + (1651737067000, "horaedb5", 105), + (1651737067000, "horaedb6", 106), + (1651737067000, "horaedb7", 107), + (1651737067000, "horaedb8", 108), + (1651737067000, "horaedb9", 109), + (1651737067000, "horaedb10", 110); -SELECT * from partition_table_t where name = "ceresdb0"; +SELECT * from partition_table_t where name = "horaedb0"; -SELECT * from partition_table_t where name = "ceresdb1"; +SELECT * from partition_table_t where name = "horaedb1"; -SELECT * from partition_table_t where name = "ceresdb2"; +SELECT * from partition_table_t where name = "horaedb2"; -SELECT * from partition_table_t where name = "ceresdb3"; +SELECT * from partition_table_t where name = "horaedb3"; -SELECT * from partition_table_t where name in ("ceresdb0", "ceresdb1", "ceresdb2", "ceresdb3", "ceresdb4") order by name; +SELECT * from partition_table_t where name in ("horaedb0", "horaedb1", "horaedb2", "horaedb3", "horaedb4") order by name; -SELECT * from partition_table_t where name in ("ceresdb5", "ceresdb6", "ceresdb7","ceresdb8", "ceresdb9", "ceresdb10") order by name; +SELECT * from partition_table_t where name in ("horaedb5", "horaedb6", "horaedb7","horaedb8", "horaedb9", "horaedb10") order by name; ALTER TABLE partition_table_t ADD COLUMN (b string); -INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, "ceresdb0", 100); +INSERT INTO partition_table_t (t, id, name, value) VALUES (1651737067000, 10, "horaedb0", 100); ALTER TABLE partition_table_t MODIFY SETTING enable_ttl='true'; @@ -66,21 +66,21 @@ CREATE TABLE `random_partition_table_t`( SHOW CREATE TABLE random_partition_table_t; INSERT INTO random_partition_table_t (t, name, value) -VALUES (1651737067000, "ceresdb0", 100), - (1651737067000, "ceresdb1", 101), - (1651737067000, "ceresdb2", 102), - (1651737067000, "ceresdb3", 103), - (1651737067000, "ceresdb4", 104), - (1651737067000, "ceresdb5", 105), - (1651737067000, "ceresdb6", 106), - (1651737067000, "ceresdb7", 107), - (1651737067000, "ceresdb8", 108), - (1651737067000, "ceresdb9", 109), - (1651737067000, "ceresdb10", 110); - -SELECT * from random_partition_table_t where name = "ceresdb0"; - -SELECT * from random_partition_table_t where name = "ceresdb5"; +VALUES (1651737067000, "horaedb0", 100), + (1651737067000, "horaedb1", 101), + (1651737067000, "horaedb2", 102), + (1651737067000, "horaedb3", 103), + (1651737067000, "horaedb4", 104), + (1651737067000, "horaedb5", 105), + (1651737067000, "horaedb6", 106), + (1651737067000, "horaedb7", 107), + (1651737067000, "horaedb8", 108), + (1651737067000, "horaedb9", 109), + (1651737067000, "horaedb10", 110); + +SELECT * from random_partition_table_t where name = "horaedb0"; + +SELECT * from random_partition_table_t where name = "horaedb5"; DROP TABLE IF EXISTS `random_partition_table_t`; diff --git a/integration_tests/cases/env/local/config.toml b/integration_tests/cases/env/local/config.toml index d279f321d4..81e198f696 100644 --- a/integration_tests/cases/env/local/config.toml +++ b/integration_tests/cases/env/local/config.toml @@ -22,15 +22,15 @@ read_parallelism = 8 [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" [analytic.storage] mem_cache_capacity = '1G' mem_cache_partition_bits = 0 -disk_cache_dir = "/tmp/ceresdb" +disk_cache_dir = "/tmp/horaedb" disk_cache_capacity = '2G' disk_cache_page_size = '1M' [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" diff --git a/integration_tests/cases/env/local/ddl/query-plan.result b/integration_tests/cases/env/local/ddl/query-plan.result index 9fe35c86a2..57ddcbb643 100644 --- a/integration_tests/cases/env/local/ddl/query-plan.result +++ b/integration_tests/cases/env/local/ddl/query-plan.result @@ -15,9 +15,9 @@ affected_rows: 0 INSERT INTO `03_dml_select_real_time_range` (t, name, value) VALUES - (1695348000000, "ceresdb", 100), - (1695348001000, "ceresdb", 200), - (1695348002000, "ceresdb", 300); + (1695348000000, "horaedb", 100), + (1695348001000, "horaedb", 200), + (1695348002000, "horaedb", 300); affected_rows: 3 diff --git a/integration_tests/cases/env/local/ddl/query-plan.sql b/integration_tests/cases/env/local/ddl/query-plan.sql index 00fb19e05c..51e760b477 100644 --- a/integration_tests/cases/env/local/ddl/query-plan.sql +++ b/integration_tests/cases/env/local/ddl/query-plan.sql @@ -11,9 +11,9 @@ CREATE TABLE `03_dml_select_real_time_range` ( INSERT INTO `03_dml_select_real_time_range` (t, name, value) VALUES - (1695348000000, "ceresdb", 100), - (1695348001000, "ceresdb", 200), - (1695348002000, "ceresdb", 300); + (1695348000000, "horaedb", 100), + (1695348001000, "horaedb", 200), + (1695348002000, "horaedb", 300); -- This query should include memtable -- SQLNESS REPLACE duration=\d+.?\d*(ยต|m|n) duration=xx diff --git a/integration_tests/cases/env/local/ddl/sampling-primary-key.result b/integration_tests/cases/env/local/ddl/sampling-primary-key.result index 0324b1fc1b..45d74f4e72 100644 --- a/integration_tests/cases/env/local/ddl/sampling-primary-key.result +++ b/integration_tests/cases/env/local/ddl/sampling-primary-key.result @@ -25,20 +25,20 @@ String("sampling_primary_key_table"),String("CREATE TABLE `sampling_primary_key_ INSERT INTO `sampling_primary_key_table` (t, name, myVALUE) VALUES - (1695348000000, "ceresdb2", 200), - (1695348000005, "ceresdb2", 100), - (1695348000001, "ceresdb1", 100), - (1695348000003, "ceresdb3", 200); + (1695348000000, "horaedb2", 200), + (1695348000005, "horaedb2", 100), + (1695348000001, "horaedb1", 100), + (1695348000003, "horaedb3", 200); affected_rows: 4 select * from `sampling_primary_key_table`; tsid,t,v1,v2,v3,v5,name,myVALUE, -UInt64(5478297384049724685),Timestamp(1695348000000),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb2"),Int64(200), -UInt64(5478297384049724685),Timestamp(1695348000005),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb2"),Int64(100), -UInt64(9680600349107584624),Timestamp(1695348000001),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb1"),Int64(100), -UInt64(13753293625875895842),Timestamp(1695348000003),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb3"),Int64(200), +UInt64(955822522188633507),Timestamp(1695348000003),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb3"),Int64(200), +UInt64(9464314370308696884),Timestamp(1695348000001),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb1"),Int64(100), +UInt64(14649097417416496686),Timestamp(1695348000000),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb2"),Int64(200), +UInt64(14649097417416496686),Timestamp(1695348000005),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb2"),Int64(100), -- After flush, its primary key should changed. @@ -52,10 +52,10 @@ String("sampling_primary_key_table"),String("CREATE TABLE `sampling_primary_key_ select * from `sampling_primary_key_table`; tsid,t,v1,v2,v3,v5,name,myVALUE, -UInt64(9680600349107584624),Timestamp(1695348000001),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb1"),Int64(100), -UInt64(5478297384049724685),Timestamp(1695348000005),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb2"),Int64(100), -UInt64(5478297384049724685),Timestamp(1695348000000),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb2"),Int64(200), -UInt64(13753293625875895842),Timestamp(1695348000003),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("ceresdb3"),Int64(200), +UInt64(9464314370308696884),Timestamp(1695348000001),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb1"),Int64(100), +UInt64(14649097417416496686),Timestamp(1695348000005),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb2"),Int64(100), +UInt64(14649097417416496686),Timestamp(1695348000000),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb2"),Int64(200), +UInt64(955822522188633507),Timestamp(1695348000003),Double(0.0),Double(0.0),Double(0.0),Double(0.0),String("horaedb3"),Int64(200), DROP TABLE IF EXISTS `sampling_primary_key_table`; diff --git a/integration_tests/cases/env/local/ddl/sampling-primary-key.sql b/integration_tests/cases/env/local/ddl/sampling-primary-key.sql index 4c1612ee67..23e7b07b2c 100644 --- a/integration_tests/cases/env/local/ddl/sampling-primary-key.sql +++ b/integration_tests/cases/env/local/ddl/sampling-primary-key.sql @@ -18,10 +18,10 @@ show create table `sampling_primary_key_table`; INSERT INTO `sampling_primary_key_table` (t, name, myVALUE) VALUES - (1695348000000, "ceresdb2", 200), - (1695348000005, "ceresdb2", 100), - (1695348000001, "ceresdb1", 100), - (1695348000003, "ceresdb3", 200); + (1695348000000, "horaedb2", 200), + (1695348000005, "horaedb2", 100), + (1695348000001, "horaedb1", 100), + (1695348000003, "horaedb3", 200); select * from `sampling_primary_key_table`; diff --git a/integration_tests/config/horaedb-cluster-0.toml b/integration_tests/config/horaedb-cluster-0.toml index 31e9f52639..94f35dc2c1 100644 --- a/integration_tests/config/horaedb-cluster-0.toml +++ b/integration_tests/config/horaedb-cluster-0.toml @@ -23,7 +23,7 @@ mysql_port = 3307 deploy_mode = "Cluster" [tracing] -dir = "/tmp/ceresdb0" +dir = "/tmp/horaedb0" [analytic.storage] mem_cache_capacity = '1G' @@ -31,11 +31,11 @@ mem_cache_partition_bits = 0 [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb0" +data_dir = "/tmp/horaedb0" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb0" +data_dir = "/tmp/horaedb0" [cluster_deployment] mode = "WithMeta" diff --git a/integration_tests/config/horaedb-cluster-1.toml b/integration_tests/config/horaedb-cluster-1.toml index fa995047a4..0e951fb67e 100644 --- a/integration_tests/config/horaedb-cluster-1.toml +++ b/integration_tests/config/horaedb-cluster-1.toml @@ -24,7 +24,7 @@ postgresql_port = 15433 deploy_mode = "Cluster" [tracing] -dir = "/tmp/ceresdb1" +dir = "/tmp/horaedb1" [analytic.storage] mem_cache_capacity = '1G' @@ -32,11 +32,11 @@ mem_cache_partition_bits = 0 [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb1" +data_dir = "/tmp/horaedb1" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb1" +data_dir = "/tmp/horaedb1" [cluster_deployment] mode = "WithMeta" diff --git a/integration_tests/config/shard-based-recovery.toml b/integration_tests/config/shard-based-recovery.toml index 7228d71946..f3e316494f 100644 --- a/integration_tests/config/shard-based-recovery.toml +++ b/integration_tests/config/shard-based-recovery.toml @@ -21,15 +21,15 @@ grpc_port = 8831 level = "info" [tracing] -dir = "/tmp/ceresdb" +dir = "/tmp/horaedb" [analytic] recover_mode = "ShardBased" [analytic.storage.object_store] type = "Local" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" [analytic.wal] type = "RocksDB" -data_dir = "/tmp/ceresdb" +data_dir = "/tmp/horaedb" diff --git a/integration_tests/opentsdb/test-put.py b/integration_tests/opentsdb/test-put.py index 5702007a16..983449bf71 100755 --- a/integration_tests/opentsdb/test-put.py +++ b/integration_tests/opentsdb/test-put.py @@ -255,7 +255,7 @@ def test_put_multi_points_with_different_tags_in_one_table(): """.strip().replace('{ts}', str(ts)) -# CeresDB internal error: "Column: value in table: ??? data type is not same, expected: bigint, actual: double" +# HoraeDB internal error: "Column: value in table: ??? data type is not same, expected: bigint, actual: double" def test_put_multi_points_with_different_datatype_in_one_table(): ts = now() table_name = table_prefix + str(ts) diff --git a/integration_tests/prom/remote-query.py b/integration_tests/prom/remote-query.py index 3d85876ce2..010688b920 100755 --- a/integration_tests/prom/remote-query.py +++ b/integration_tests/prom/remote-query.py @@ -79,7 +79,7 @@ def remote_query(ts): assert result == [] # uppercase field - r = execute_pql(table + '{tag1="v1",__ceresdb_field__="VALUE2"}[5m]') + r = execute_pql(table + '{tag1="v1",__horaedb_field__="VALUE2"}[5m]') result = r['data']['result'] assert result == [{'metric': {'__name__': table, 'tag1': 'v1', 'TAG2': 'v2'}, 'values': [[ts-5, '2'], [ts, '22']]}] diff --git a/query_frontend/src/promql/remote.rs b/query_frontend/src/promql/remote.rs index 6b8c8f8f3f..be38936a14 100644 --- a/query_frontend/src/promql/remote.rs +++ b/query_frontend/src/promql/remote.rs @@ -38,7 +38,8 @@ use crate::{ pub const NAME_LABEL: &str = "__name__"; pub const DEFAULT_FIELD_COLUMN: &str = "value"; -const FIELD_LABEL: &str = "__ceresdb_field__"; +// FIXME: perhaps make it configurable https://github.com/CeresDB/horaedb/issues/1329 +const FIELD_LABEL: &str = "__horaedb_field__"; pub struct RemoteQueryPlan { pub plan: Plan,