Jackie-Jiang commented on code in PR #19450:
URL: https://github.com/apache/pinot/pull/19450#discussion_r4041859034
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -484,6 +484,7 @@ protected void
replaceSegmentIfCrcMismatch(SegmentDataManager segmentDataManager
_logger.info("Replacing segment: {} because its CRC has changed from: {}
to: {}", segmentName,
localMetadata.getCrc(), zkMetadata.getCrc());
downloadAndLoadSegment(zkMetadata, indexLoadingConfig);
+ _serverMetrics.addMeteredTableValue(_tableNameWithType,
ServerMeter.SEGMENT_REPLACED_DUE_TO_CRC_MISMATCH, 1);
Review Comment:
[P2] Count CRC-driven reload replacements too
`reloadSegment(..., forceDownload=false)` also replaces an already loaded
segment after a confirmed CRC mismatch: it sets `shouldDownload` from the CRC
check at lines 1131–1134, downloads the segment, and calls `addSegment` at line
1207. That path never calls `replaceSegmentIfCrcMismatch`, so the new metric
stays unchanged even when the replacement succeeds. Please increment the meter
after a successful CRC-triggered reload as well, keeping failed reloads and
same-CRC forced downloads excluded. The existing `testReloadSegmentNewData`
already exercises this path and can be extended to verify the increment.
--
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]