deepthi912 commented on code in PR #19505:
URL: https://github.com/apache/pinot/pull/19505#discussion_r4020801898


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java:
##########
@@ -711,7 +711,17 @@ protected void revertSegmentUpsertMetadata(IndexSegment 
oldSegment, String segme
     _logger.info("Inconsistencies noticed for the segment: {} across servers, 
reverting the metadata to resolve...",
         segmentName);
     // Revert the keys in the segment to previous location and remove the 
newly added keys
-    removeSegment(oldSegment, validDocIdsForOldSegment);
+    try {
+      removeSegment(oldSegment, validDocIdsForOldSegment);
+    } catch (RuntimeException e) {
+      String message = "UPSERT_METADATA_REVERT_FAILED: table=" + 
_tableNameWithType + ", partition=" + _partitionId

Review Comment:
   This exception would push the segments to go into error state. This is a 
good safegaurd but I am wondering if this might confuse the users and they 
would end up in this situation where our revert solution didn't work.
   How do we give the users to move forward from this when the damage is 
already done?



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

Reply via email to