Copilot commented on code in PR #18002:
URL: https://github.com/apache/pinot/pull/18002#discussion_r3003365109
##########
pinot-common/src/main/java/org/apache/pinot/common/datatable/DataTableImplV4.java:
##########
@@ -422,9 +422,8 @@ 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.
+ // Add table serialization time and memory metadata when the corresponding
measurement is enabled.
+ // When CPU time/memory usage is not collectable, we omit these values
from the metadata.
if (ThreadResourceUsageProvider.isThreadCpuTimeMeasurementEnabled()) {
getMetadata().put(MetadataKey.RESPONSE_SER_CPU_TIME_NS.getName(),
String.valueOf(resourceSnapshot.getCpuTimeNs()));
Review Comment:
This change only updates the comment, but the code still conditionally
writes response serialization CPU/memory metadata based on
ThreadResourceUsageProvider.isThread*MeasurementEnabled(). The PR
title/description says the backward-compat guard was removed and the values are
now always populated—either the implementation needs to be updated to match
that behavior or the PR description/title should be corrected.
--
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]