Commit 9a66fc024884d93637a4e3e4e509cf0d7ec3d0e2
Merge branch 'master' of https://github.com/thingsboard/thingsboard into develop/2.5-js-executor
Showing
4 changed files
with
5 additions
and
3 deletions
... | ... | @@ -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 | } | ... | ... |