mqliang commented on a change in pull request #7086:
URL: https://github.com/apache/incubator-pinot/pull/7086#discussion_r658335970
##########
File path:
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseSingleSegmentConversionExecutor.java
##########
@@ -70,6 +70,14 @@ public SegmentConversionResult executeTask(PinotTaskConfig
pinotTaskConfig)
String originalSegmentCrc =
configs.get(MinionConstants.ORIGINAL_SEGMENT_CRC_KEY);
String authToken = configs.get(MinionConstants.AUTH_TOKEN);
+ long currentSegmentCrc = getSegmentCrc(tableNameWithType, segmentName);
+ if (Long.parseLong(originalSegmentCrc) != currentSegmentCrc) {
+ LOGGER.info("Segment CRC does not match, skip the task. Original CRC:
{}, current CRC: {}", originalSegmentCrc,
+ currentSegmentCrc);
+ return new
SegmentConversionResult.Builder().setTableNameWithType(tableNameWithType).setSegmentName(segmentName)
+ .build();
Review comment:
After reading the helix code carefully, `TaskResult.FAILED` is
equivalent to `TaskPartitionState.TASK_ERROR `, `TaskResult.FATAL_FAILED` is
equivalent to `TaskPartitionState.TASK_ABORTED`. So `FATAL_FAILED ` seems the
best choice for us, it does not change the current behavior: if we don't check
CRC first, the task will turn into `FATAL_FAILED ` when upload anyway.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]