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


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -389,15 +390,21 @@ protected void 
replaceSegmentIfCrcMismatch(SegmentDataManager segmentDataManager
       IndexLoadingConfig indexLoadingConfig)
       throws Exception {
     String segmentName = segmentDataManager.getSegmentName();
-    Preconditions.checkState(segmentDataManager instanceof 
ImmutableSegmentDataManager,
-        "Cannot replace CONSUMING segment: %s in table: %s", segmentName, 
_tableNameWithType);
-    SegmentMetadata localMetadata = 
segmentDataManager.getSegment().getSegmentMetadata();
-    if (hasSameCRC(zkMetadata, localMetadata)) {
-      _logger.info("Segment: {} has CRC: {} same as before, not replacing it", 
segmentName, localMetadata.getCrc());
-      return;
+    TableConfig tableConfig = indexLoadingConfig.getTableConfig();
+    // For pauseless tables, we should replace the segment if download url is 
missing even if crc is same
+    // Without this the reingestion of ERROR segments in pauseless tables fails
+    // as the segment data manager is still an instance of 
RealtimeSegmentDataManager
+    if (!PauselessConsumptionUtils.isPauselessEnabled(tableConfig)) {

Review Comment:
   We probably need a new API to handle re-ingested segment. It is not regular 
segment push. With a new API we can also set the status to `DONE`, and then 
trigger the reset from the API.



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

Reply via email to