9aman commented on code in PR #14920:
URL: https://github.com/apache/pinot/pull/14920#discussion_r1939110550
##########
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:
I am not able to come up with a better approach to achieve this but this
does not seem the right way to cater to re-ingestion.
--
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]