This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new 0834a64e1 Fix the issue of slow reading results when using S3. (#4742)
0834a64e1 is described below

commit 0834a64e157c4e7afa3d4d100bd116e2a63ffcb7
Author: sjgllgh <[email protected]>
AuthorDate: Wed Jul 5 11:46:10 2023 +0800

    Fix the issue of slow reading results when using S3. (#4742)
---
 .../main/java/org/apache/linkis/storage/utils/StorageUtils.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/utils/StorageUtils.java
 
b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/utils/StorageUtils.java
index ed5099b67..692ce619b 100644
--- 
a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/utils/StorageUtils.java
+++ 
b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/utils/StorageUtils.java
@@ -227,7 +227,12 @@ public class StorageUtils {
     int readLen = 0;
     try {
       int count = 0;
-      while (readLen < len) {
+      // 
当使用s3存储结果文件时时,com.amazonaws.services.s3.model.S3InputStream无法正确读取.dolphin文件。需要在循环条件添加:
+      // readLen >= 0
+      // To resolve the issue when using S3 to store result files and
+      // com.amazonaws.services.s3.model.S3InputStream to read .dolphin files, 
you need to add the
+      // condition readLen >= 0 in the loop.
+      while (readLen < len && readLen >= 0) {
         count = inputStream.read(bytes, readLen, len - readLen);
 
         if (count == -1 && inputStream.available() < 1) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to