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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6e2f2eee221 [regression-test](fix) fix StreamLoadAction bug (#51461)
6e2f2eee221 is described below

commit 6e2f2eee2218327b9a3f7aade14c0adfad2137b5
Author: shuke <[email protected]>
AuthorDate: Thu Jun 5 15:11:16 2025 +0800

    [regression-test](fix) fix StreamLoadAction bug (#51461)
    
    When running stream load on same remote file, sometimes load meets
    `Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot
    retry request with a non-repeatable request entity
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:108)
    at
    org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at
    
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
                                    ... 100 common frames omitted
    Caused by: org.apache.http.ConnectionClosedException: Premature end of
    Content-Length delimited message body (expected: 129,961,387; received:
    120,217,793)`
    
    This pr try to solve this problem by put resp body into different
    buffer.
---
 .../org/apache/doris/regression/action/StreamLoadAction.groovy       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/action/StreamLoadAction.groovy
 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/action/StreamLoadAction.groovy
index c3a530b579c..f8748433c21 100644
--- 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/action/StreamLoadAction.groovy
+++ 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/action/StreamLoadAction.groovy
@@ -216,7 +216,10 @@ class StreamLoadAction implements SuiteAction {
             throw new IllegalStateException("Get http stream failed, status 
code is ${code}, body:\n${streamBody}")
         }
 
-        return resp.getEntity().getContent()
+        ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+        resp.getEntity().writeTo(buffer); // 完整读取数据
+        log.info("entity new size is ${buffer.size()}")
+        return new ByteArrayInputStream(buffer.toByteArray());
     }
 
     private RequestBuilder prepareRequestHeader(RequestBuilder requestBuilder) 
{


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

Reply via email to