KKcorps commented on code in PR #14798: URL: https://github.com/apache/pinot/pull/14798#discussion_r1914053530
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java: ########## @@ -1764,6 +1794,86 @@ public void uploadToDeepStoreIfMissing(TableConfig tableConfig, List<SegmentZKMe } } + /** + * Updates the segment metadata in ZooKeeper. For pauseless consumption, if the segment's CRC value is -1 + * (DEFAULT_CRC_VALUE) which indicates a failed segment commit end metadata call, additional metadata fields + * are also updated along with CRC. + * + * @param segmentZKMetadata Current segment metadata in ZooKeeper that needs to be updated + * @param uploadedSegmentZKMetadata Metadata from the uploaded segment containing new values + * @param isPauselessEnabled Flag indicating if pauseless consumption is enabled for the table + */ + private void updateSegmentMetadata(SegmentZKMetadata segmentZKMetadata, SegmentZKMetadata uploadedSegmentZKMetadata, + boolean isPauselessEnabled) { + if (isPauselessEnabled && segmentZKMetadata.getCrc() == SegmentZKMetadata.DEFAULT_CRC_VALUE) { Review Comment: Should the CRC check here be changed to Status? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org