KKcorps commented on code in PR #19505:
URL: https://github.com/apache/pinot/pull/19505#discussion_r4023068582
##########
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:
So on this, I think a good path will be
* Do not throw any exception here and only log and increment a metric
* Have an alert on this metric
* When you receive this alert, you go ahead and reset the partition to state
before this error. For Pauseless + Dedup, we do this by deleting all segments
in the partition >= seqNumber specified, there is an API for this already
What do you think?
--
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]