This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 17f3c1e6ab [core] RemoteLookupFileManager#tryToDownload should return
false when faced with exceptions (#6646)
17f3c1e6ab is described below
commit 17f3c1e6ab168299f27974d399574ee064742d49
Author: tsreaper <[email protected]>
AuthorDate: Fri Nov 21 15:04:23 2025 +0800
[core] RemoteLookupFileManager#tryToDownload should return false when faced
with exceptions (#6646)
---
.../mergetree/compact/RemoteLookupFileManager.java | 24 ++++++++++++++--------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/mergetree/compact/RemoteLookupFileManager.java
b/paimon-core/src/main/java/org/apache/paimon/mergetree/compact/RemoteLookupFileManager.java
index 4303e2374c..b7960f8e33 100644
---
a/paimon-core/src/main/java/org/apache/paimon/mergetree/compact/RemoteLookupFileManager.java
+++
b/paimon-core/src/main/java/org/apache/paimon/mergetree/compact/RemoteLookupFileManager.java
@@ -32,6 +32,8 @@ import org.apache.paimon.schema.TableSchema;
import org.apache.paimon.types.RowType;
import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
@@ -46,6 +48,8 @@ import java.util.Optional;
/** Manager to manage remote files for lookup. */
public class RemoteLookupFileManager<T> implements RemoteFileDownloader {
+ private static final Logger LOG =
LoggerFactory.getLogger(RemoteLookupFileManager.class);
+
private final FileIO fileIO;
private final DataFilePathFactory pathFactory;
private final TableSchema schema;
@@ -110,17 +114,19 @@ public class RemoteLookupFileManager<T> implements
RemoteFileDownloader {
}
Optional<String> remoteSst = remoteSst(dataFile);
- if (remoteSst.isPresent()) {
- Path remoteSstPath = remoteSstPath(dataFile, remoteSst.get());
- try (SeekableInputStream is = fileIO.newInputStream(remoteSstPath);
- FileOutputStream os = new FileOutputStream(localFile)) {
- IOUtils.copy(is, os);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
+ if (!remoteSst.isPresent()) {
+ return false;
+ }
+
+ Path remoteSstPath = remoteSstPath(dataFile, remoteSst.get());
+ try (SeekableInputStream is = fileIO.newInputStream(remoteSstPath);
+ FileOutputStream os = new FileOutputStream(localFile)) {
+ IOUtils.copy(is, os);
return true;
+ } catch (Exception e) {
+ LOG.warn("Failed to download remote lookup file {}, skipping.",
remoteSstPath, e);
+ return false;
}
- return false;
}
private Optional<String> remoteSst(DataFileMeta file) {