xingtanzjr commented on code in PR #9439:
URL: https://github.com/apache/iotdb/pull/9439#discussion_r1148902175


##########
server/src/main/java/org/apache/iotdb/db/service/metrics/IoTDBInternalLocalReporter.java:
##########
@@ -150,39 +150,43 @@ public ReporterType getReporterType() {
 
   @Override
   protected void writeMetricToIoTDB(Map<String, Object> valueMap, String 
prefix, long time) {
-    try {
-      TSInsertRecordReq request = new TSInsertRecordReq();
-      List<String> measurements = new ArrayList<>();
-      List<TSDataType> types = new ArrayList<>();
-      List<Object> values = new ArrayList<>();
-      for (Map.Entry<String, Object> entry : valueMap.entrySet()) {
-        String measurement = entry.getKey();
-        Object value = entry.getValue();
-        measurements.add(measurement);
-        types.add(inferType(value));
-        values.add(value);
-      }
-      ByteBuffer buffer = SessionUtils.getValueBuffer(types, values);
+    service.execute(

Review Comment:
   Yes, you're correct. Actually my point of previous comment is that there is 
`potential risk` in current implementation at the same time it won't lead to 
dead-lock. This is just a talk about whether submit a new task inside a thread 
pool to itself is a the best practice or not. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to