Просмотр исходного кода

Merge pull request #13965 from lafirest/fix/iotdb_batch

fix(iotdb): fixed function clause error in batch mode
lafirest 1 год назад
Родитель
Сommit
fb204546e8
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl

+ 6 - 2
apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl

@@ -576,10 +576,14 @@ on_batch_query_async(
     }),
     {error, not_support}.
 
-%% todo
+%% TODO:
+%% Currently, the batch mode is not really `batch` for the Rest API and Thrift drivers.
+%% 1. For Rest API we need to upgrade from v1 to v2 which has a batch endpoint `insertRecords`,
+%%    and we should take care to ensure this is not a breaking change
+%% 2. For the Thrift, we can use the `tSInsertTabletsReq` or `tSInsertRecordsReq` protocol
 on_batch_query(
     InstId,
-    [{ChannelId, _Message}] = Requests,
+    [{ChannelId, _Message} | _] = Requests,
     #{iotdb_version := IoTDBVsn, channels := Channels} = State
 ) ->
     ?tp(iotdb_bridge_on_batch_query, #{instance_id => InstId}),