navina commented on code in PR #10216: URL: https://github.com/apache/pinot/pull/10216#discussion_r1095143970
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SegmentCommitterFactory.java: ########## @@ -69,9 +70,13 @@ public SegmentCommitter createSegmentCommitter(boolean isSplitCommit, SegmentCom boolean uploadToFs = _streamConfig.isServerUploadToDeepStore(); String peerSegmentDownloadScheme = _tableConfig.getValidationConfig().getPeerSegmentDownloadScheme(); - // TODO: exists for backwards compatibility. remove peerDownloadScheme non-null check once users have migrated - if (uploadToFs || peerSegmentDownloadScheme != null) { - segmentUploader = new PinotFSSegmentUploader(_indexLoadingConfig.getSegmentStoreURI(), + String segmentStoreUri = _indexLoadingConfig.getSegmentStoreURI(); + + // We seem to allow the server instance to come up without a valid segment store uri. Hence, this check is needed. + if (!Strings.isNullOrEmpty(segmentStoreUri) Review Comment: > (MAJOR) When segment upload fails, but peer download is enabled, we still want to use the `PinotFSSegmentUploader` because peer download doesn't require segment to be successfully uploaded. We can attach this check to the `uploadToFs` This PR doesn't really change anything with respect to upload failure handling. These configs only control what uploader is being used. If you see SplitSegmentCommitter [here](https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SplitSegmentCommitter.java#L99), this part handles the upload failure in the presence of a peer download scheme. The behavior is the same as it was before this PR. Note: It might be cleaner to have a failure handler provided as the committer context. but that still doesn't change any existing behavior -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org