sajjad-moradi commented on a change in pull request #7896:
URL: https://github.com/apache/pinot/pull/7896#discussion_r768994178
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
##########
@@ -854,26 +854,19 @@ protected SegmentBuildDescriptor
buildSegmentInternal(boolean forCommit) {
try {
TarGzCompressionUtils.createTarGzFile(indexDir, segmentTarFile);
} catch (IOException e) {
- String errorMessage =
- String.format("Caught exception while taring index directory
from: %s to: %s", indexDir, segmentTarFile);
- _segmentLogger.error(errorMessage, e);
- _realtimeTableDataManager
- .addSegmentError(_segmentNameStr, new
SegmentErrorInfo(System.currentTimeMillis(), errorMessage, e));
- return null;
+ throw new SegmentGenerationException(String.format("Caught exception
while taring index directory from: "
+ + "%s to: %s", indexDir, segmentTarFile), e);
}
File metadataFile = SegmentDirectoryPaths.findMetadataFile(indexDir);
if (metadataFile == null) {
- _segmentLogger
- .error("Failed to find file: {} under index directory: {}",
V1Constants.MetadataKeys.METADATA_FILE_NAME,
- indexDir);
- return null;
+ throw new IllegalStateException(String.format("Failed to find file:
%s under index directory: %s",
Review comment:
IllegalStateException doesn't get caught in `goOnlineFromConsuming` so
the desired segment download step wouldn't happen in this case.
--
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]