snleee commented on a change in pull request #7744:
URL: https://github.com/apache/pinot/pull/7744#discussion_r747769357
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -2945,10 +2971,11 @@ public void revertReplaceSegments(String
tableNameWithType, String segmentLineag
// We do not allow to revert the lineage entry with 'REVERTED'
state. For 'IN_PROGRESS", we only allow to
// revert when 'forceRevert' is set to true.
if (lineageEntry.getState() != LineageEntryState.IN_PROGRESS ||
!forceRevert) {
- LOGGER.warn("Lineage state is not valid. Cannot revert the lineage
entry. (tableNameWithType={}, "
- + "segmentLineageEntryId={}, segmentLineageEntrySate={},
forceRevert={})", tableNameWithType,
+ String errorMsg = String.format(
+ "Lineage state is not valid. Cannot revert the lineage entry.
(tableNameWithType=%s, "
+ + "segmentLineageEntryId=%s, segmentLineageEntrySate=%s,
forceRevert=%s)", tableNameWithType,
segmentLineageEntryId, lineageEntry.getState(), forceRevert);
- return false;
+ throw new RuntimeException(errorMsg);
Review comment:
This is not a retriable error. We need to abort the operation for under
this condition.
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -2945,10 +2971,11 @@ public void revertReplaceSegments(String
tableNameWithType, String segmentLineag
// We do not allow to revert the lineage entry with 'REVERTED'
state. For 'IN_PROGRESS", we only allow to
// revert when 'forceRevert' is set to true.
if (lineageEntry.getState() != LineageEntryState.IN_PROGRESS ||
!forceRevert) {
- LOGGER.warn("Lineage state is not valid. Cannot revert the lineage
entry. (tableNameWithType={}, "
- + "segmentLineageEntryId={}, segmentLineageEntrySate={},
forceRevert={})", tableNameWithType,
+ String errorMsg = String.format(
+ "Lineage state is not valid. Cannot revert the lineage entry.
(tableNameWithType=%s, "
+ + "segmentLineageEntryId=%s, segmentLineageEntrySate=%s,
forceRevert=%s)", tableNameWithType,
segmentLineageEntryId, lineageEntry.getState(), forceRevert);
- return false;
+ throw new RuntimeException(errorMsg);
Review comment:
This is not a retriable error. We need to abort the operation under this
condition.
--
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]