Commit 9a66fc024884d93637a4e3e4e509cf0d7ec3d0e2

Authored by YevhenBondarenko
2 parents e5c5aa70 89d19fb3

Merge branch 'master' of https://github.com/thingsboard/thingsboard into develop/2.5-js-executor

... ... @@ -3,7 +3,7 @@
3 3 "additionalInfo": null,
4 4 "name": "Root Rule Chain",
5 5 "firstRuleNodeId": null,
6   - "root": false,
  6 + "root": true,
7 7 "debugMode": false,
8 8 "configuration": null
9 9 },
... ...
... ... @@ -46,7 +46,7 @@ public class PsqlTsDatabaseUpgradeService extends AbstractSqlTsDatabaseUpgradeSe
46 46
47 47 private static final String CREATE_PARTITION_TS_KV_TABLE = "create_partition_ts_kv_table()";
48 48 private static final String CREATE_NEW_TS_KV_LATEST_TABLE = "create_new_ts_kv_latest_table()";
49   - private static final String CREATE_PARTITIONS = "create_partitions()";
  49 + private static final String CREATE_PARTITIONS = "create_partitions(IN partition_type varchar)";
50 50 private static final String CREATE_TS_KV_DICTIONARY_TABLE = "create_ts_kv_dictionary_table()";
51 51 private static final String INSERT_INTO_DICTIONARY = "insert_into_dictionary()";
52 52 private static final String INSERT_INTO_TS_KV = "insert_into_ts_kv()";
... ... @@ -108,7 +108,6 @@ public class PsqlTsDatabaseUpgradeService extends AbstractSqlTsDatabaseUpgradeSe
108 108 executeQuery(conn, DROP_PROCEDURE_INSERT_INTO_TS_KV);
109 109 executeQuery(conn, DROP_PROCEDURE_CREATE_NEW_TS_KV_LATEST_TABLE);
110 110 executeQuery(conn, DROP_PROCEDURE_INSERT_INTO_TS_KV_LATEST);
111   - executeQuery(conn, DROP_PROCEDURE_INSERT_INTO_TS_KV_LATEST);
112 111 executeQuery(conn, DROP_FUNCTION_GET_PARTITION_DATA);
113 112
114 113 executeQuery(conn, "ALTER TABLE ts_kv ADD COLUMN IF NOT EXISTS json_v json;");
... ...
... ... @@ -106,6 +106,7 @@ public class TbKafkaConsumerTemplate<T extends TbQueueMsg> implements TbQueueCon
106 106 if (!subscribed) {
107 107 List<String> topicNames = partitions.stream().map(TopicPartitionInfo::getFullTopicName).collect(Collectors.toList());
108 108 topicNames.forEach(admin::createTopicIfNotExists);
  109 + consumer.unsubscribe();
109 110 consumer.subscribe(topicNames);
110 111 subscribed = true;
111 112 }
... ...
... ... @@ -10,3 +10,5 @@ CACHE_TYPE=redis
10 10 REDIS_HOST=redis
11 11
12 12 HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE=false
  13 +
  14 +TB_QUEUE_PARTITIONS_VIRTUAL_NODES_SIZE=64
... ...