KKcorps commented on code in PR #14920:
URL: https://github.com/apache/pinot/pull/14920#discussion_r1941507341
##########
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:
Yeah, I am also not happy with this. The thing I am trying to solve for is
basically making segment refresh succeed for reingesion
Without this check it fails on the following line:
```
Preconditions.checkState(segmentDataManager instanceof
ImmutableSegmentDataManager,
"Cannot replace CONSUMING segment: %s in table: %s", segmentName,
_tableNameWithType);
```
Segment refresh is triggered whenever a segment is uploaded which is what
reingestion is doing.
--
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]