github-actions[bot] commented on code in PR #61284:
URL: https://github.com/apache/doris/pull/61284#discussion_r2924363856
##########
fe/fe-core/src/main/java/org/apache/doris/job/offset/s3/S3SourceOffsetProvider.java:
##########
@@ -17,6 +17,8 @@
package org.apache.doris.job.offset.s3;
+import org.apache.doris.backup.Status;
+import org.apache.doris.common.util.DebugPointUtil;
import org.apache.doris.datasource.property.storage.StorageProperties;
import org.apache.doris.fs.FileSystemFactory;
import org.apache.doris.fs.GlobListResult;
Review Comment:
**Bug: Double-wrapped RuntimeException loses the clear error message.**
This `throw new RuntimeException("Failed to list S3 files: " + errMsg)` is
inside the `try (RemoteFileSystem ...)` block. It will be immediately caught by
the `catch (Exception e)` at line 106 (original numbering), which re-wraps it
as `throw new RuntimeException(e)`. The result is a double-wrapped exception
where the outer message is just the `toString()` of the inner RuntimeException,
losing the clean "Failed to list S3 files" message that the caller
(`AbstractStreamingTask.execute()`) uses for `errMsg`.
Suggested fix: either (a) catch only non-RuntimeException in the catch block
by re-throwing RuntimeException before wrapping, or (b) move the status check
outside/after the try-with-resources, or (c) add a specific catch clause. For
example:
```java
} catch (RuntimeException e) {
log.warn("list path exception, path={}", filePath, e);
throw e;
} catch (Exception e) {
log.warn("list path exception, path={}", filePath, e);
throw new RuntimeException(e);
}
```
Note: The same issue applies to the existing `throw new RuntimeException("No
new files found in path: " + filePath)` at line 104 (pre-existing), but since
this PR introduces the new throw, it would be good to fix the catch block as
well.
--
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]