Jackie-Jiang commented on code in PR #18002:
URL: https://github.com/apache/pinot/pull/18002#discussion_r3002819487


##########
pinot-common/src/main/java/org/apache/pinot/common/datatable/DataTableImplV4.java:
##########
@@ -422,17 +421,11 @@ public byte[] toBytes()
     DataOutputStream dataOutputStream = new 
DataOutputStream(byteArrayOutputStream);
     writeLeadingSections(dataOutputStream);
 
-    // Add table serialization time and memory metadata if thread timer is 
enabled.
-    // TODO: The check on cpu time and memory measurement is not needed. We 
can remove it. But keeping it around for
-    // backward compatibility.
-    if (ThreadResourceUsageProvider.isThreadCpuTimeMeasurementEnabled()) {
-      getMetadata().put(MetadataKey.RESPONSE_SER_CPU_TIME_NS.getName(),
-          String.valueOf(resourceSnapshot.getCpuTimeNs()));
-    }
-    if (ThreadResourceUsageProvider.isThreadMemoryMeasurementEnabled()) {
-      getMetadata().put(MetadataKey.RESPONSE_SER_MEM_ALLOCATED_BYTES.getName(),
-          String.valueOf(resourceSnapshot.getAllocatedBytes()));
-    }
+    // Add table serialization time and memory metadata.

Review Comment:
   I feel we should keep the current logic and revise the comment. When CPU 
time/memory usage not collectable, we shouldn't return their value



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to