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

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 2ccd3cbd02a [fix](regression) Use in-network MinIO endpoint for paimon 
JDBC seed (#61932)
2ccd3cbd02a is described below

commit 2ccd3cbd02a6dab600dd4002e0e8dc14769eba14
Author: Chenjunwei <[email protected]>
AuthorDate: Tue Mar 31 21:36:08 2026 +0800

    [fix](regression) Use in-network MinIO endpoint for paimon JDBC seed 
(#61932)
    
    ### What changed
    
    - switched the Paimon JDBC Spark seed path in `test_paimon_jdbc_catalog`
    to use a MinIO endpoint that is reachable from the `spark-iceberg`
    container when the paired MinIO container is present
    - kept the Doris catalog configuration on the existing external endpoint
    path
    - changed the test-local `executeCommand()` helper to consume
    stdout/stderr and apply explicit timeouts so command failures surface
    instead of hanging forever
    
    ### Why this changed
    
    The branch-4.1 external regression pipeline on `vm-57` was hanging in
    `test_paimon_jdbc_catalog` while running `docker exec ... spark-sql`.
    
    Root cause:
    
    - the Spark seed command was configured with
    `http://${externalEnvIp}:${minioPort}`
    - on the affected CI host, that host-mapped MinIO endpoint was reachable
    from the host, but not from inside `doris-external--spark-iceberg`
    - Spark therefore blocked in repeated S3A
    `AmazonS3Client.getObjectMetadata` retries while initializing the Paimon
    catalog
    - the regression test helper used `ProcessBuilder.waitFor()` without
    consuming output or enforcing a timeout, so the suite appeared to hang
    indefinitely
    
    Using the in-network MinIO container endpoint fixes the actual
    connectivity issue for the Spark seed path, and the safer command helper
    prevents future silent hangs.
    
    ### Impact
    
    - fixes the branch-4.1 Paimon JDBC external regression path on
    Docker-based CI environments where container-to-host mapped MinIO access
    is unreliable
    - limits the behavior change to the Spark seeding step of this one
    regression suite
    - improves failure visibility for the suite's external command execution
    
    ### Validation
    
    - remote manual reproduction on `vm-57`
    - confirmed the original Spark command hung when the seed path used
    `http://172.20.57.57:19001`
    - confirmed the same Spark command returned successfully in a few
    seconds when switched to `http://doris-external--minio:9000`
    - verified the clean cherry-pick branch contains only this single
    regression test change
---
 docker/thirdparties/run-thirdparties-docker.sh     | 15 ++++++-
 .../paimon/test_paimon_jdbc_catalog.groovy         | 50 +++++++++++++++-------
 2 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/docker/thirdparties/run-thirdparties-docker.sh 
b/docker/thirdparties/run-thirdparties-docker.sh
index 12e2e9b7ba4..2bb8c32f2dd 100755
--- a/docker/thirdparties/run-thirdparties-docker.sh
+++ b/docker/thirdparties/run-thirdparties-docker.sh
@@ -346,6 +346,9 @@ ensure_juicefs_hadoop_jar_for_hive() {
     local auxlib_dir="${ROOT}/docker-compose/hive/scripts/auxlib"
     local source_jar
     local juicefs_version
+    local target_jar
+    local source_realpath
+    local target_realpath
 
     source_jar=$(find_juicefs_hadoop_jar || true)
     if [[ -z "${source_jar}" ]]; then
@@ -359,7 +362,17 @@ ensure_juicefs_hadoop_jar_for_hive() {
     fi
 
     mkdir -p "${auxlib_dir}"
-    cp -f "${source_jar}" "${auxlib_dir}/"
+    target_jar="${auxlib_dir}/$(basename "${source_jar}")"
+    source_realpath=$(realpath "${source_jar}")
+    if [[ -e "${target_jar}" ]]; then
+        target_realpath=$(realpath "${target_jar}")
+        if [[ "${source_realpath}" == "${target_realpath}" ]]; then
+            echo "JuiceFS Hadoop jar already present in hive auxlib: 
$(basename "${source_jar}")"
+            return 0
+        fi
+    fi
+
+    cp -f "${source_jar}" "${target_jar}"
     echo "Synced JuiceFS Hadoop jar to hive auxlib: $(basename 
"${source_jar}")"
 }
 
diff --git 
a/regression-test/suites/external_table_p0/paimon/test_paimon_jdbc_catalog.groovy
 
b/regression-test/suites/external_table_p0/paimon/test_paimon_jdbc_catalog.groovy
index 82d8d5b0dfa..3974051f9f6 100644
--- 
a/regression-test/suites/external_table_p0/paimon/test_paimon_jdbc_catalog.groovy
+++ 
b/regression-test/suites/external_table_p0/paimon/test_paimon_jdbc_catalog.groovy
@@ -66,38 +66,58 @@ suite("test_paimon_jdbc_catalog", "p0,external") {
 
     assertTrue(jdbcDriversDir != null && !jdbcDriversDir.isEmpty(), 
"jdbc_drivers_dir must be configured")
 
-    def executeCommand = { String cmd, Boolean mustSuc ->
+    def executeCommand = { String cmd, Boolean mustSuc, int timeoutSeconds = 
300 ->
+        StringBuilder stdout = new StringBuilder()
+        StringBuilder stderr = new StringBuilder()
         try {
             logger.info("execute ${cmd}")
-            def proc = new ProcessBuilder("/bin/bash", "-c", 
cmd).redirectErrorStream(true).start()
-            int exitcode = proc.waitFor()
-            String output = proc.text
+            def proc = new ProcessBuilder("/bin/bash", "-c", cmd).start()
+            proc.consumeProcessOutput(stdout, stderr)
+            proc.waitForOrKill(timeoutSeconds * 1000)
+            int exitcode = proc.exitValue()
+            String output = stdout.toString()
+            String error = stderr.toString()
             if (exitcode != 0) {
-                logger.info("exit code: ${exitcode}, output\n: ${output}")
+                logger.info("exit code: ${exitcode}, stdout\n: 
${output}\nstderr\n: ${error}")
                 if (mustSuc) {
-                    assertTrue(false, "Execute failed: ${cmd}")
+                    assertTrue(false, "Execute failed: 
${cmd}\nstdout:\n${output}\nstderr:\n${error}")
                 }
             }
             return output
         } catch (IOException e) {
-            assertTrue(false, "Execute timeout: ${cmd}")
+            assertTrue(false, "Execute failed: ${cmd}, err: ${e.message}")
         }
     }
 
-    executeCommand("mkdir -p ${localDriverDir}", false)
-    executeCommand("mkdir -p ${jdbcDriversDir}", true)
+    executeCommand("mkdir -p ${localDriverDir}", false, 60)
+    executeCommand("mkdir -p ${jdbcDriversDir}", true, 60)
     if (!new File(localDriverPath).exists()) {
-        executeCommand("/usr/bin/curl --max-time 600 ${driverDownloadUrl} 
--output ${localDriverPath}", true)
+        executeCommand("/usr/bin/curl --max-time 600 ${driverDownloadUrl} 
--output ${localDriverPath}", true, 660)
     }
-    executeCommand("cp -f ${localDriverPath} ${jdbcDriversDir}/${driverName}", 
true)
+    executeCommand("cp -f ${localDriverPath} ${jdbcDriversDir}/${driverName}", 
true, 60)
 
-    String sparkContainerName = executeCommand("docker ps --filter 
name=spark-iceberg --format {{.Names}}", false)
+    String sparkContainerName = executeCommand("docker ps --filter 
name=spark-iceberg --format {{.Names}}", false, 30)
             ?.trim()
     if (sparkContainerName == null || sparkContainerName.isEmpty()) {
         logger.info("spark-iceberg container not found, skip this test")
         return
     }
-    executeCommand("docker cp ${localDriverPath} 
${sparkContainerName}:${sparkDriverPath}", true)
+    executeCommand("docker cp ${localDriverPath} 
${sparkContainerName}:${sparkDriverPath}", true, 60)
+
+    String sparkMinioEndpoint = "http://${externalEnvIp}:${minioPort}";
+    if (sparkContainerName.contains("spark-iceberg")) {
+        String sparkMinioContainerName = 
sparkContainerName.replaceFirst("spark-iceberg", "minio")
+        String resolvedSparkMinioContainer = executeCommand(
+                "docker ps --filter name=${sparkMinioContainerName} --format 
{{.Names}}",
+                false,
+                30
+        )?.trim()
+        if (resolvedSparkMinioContainer == sparkMinioContainerName) {
+            // Spark runs inside the docker network and may not be able to 
reach the host-mapped MinIO port.
+            sparkMinioEndpoint = "http://${resolvedSparkMinioContainer}:9000";
+        }
+    }
+    logger.info("spark seed minio endpoint: ${sparkMinioEndpoint}")
 
     def sparkPaimonJdbc = { String sqlText ->
         String escapedSql = sqlText.replaceAll('"', '\\\\"')
@@ -115,13 +135,13 @@ suite("test_paimon_jdbc_catalog", "p0,external") {
 --conf spark.sql.catalog.${sparkSeedCatalogName}.jdbc.user=postgres \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.jdbc.password=123456 \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.lock.enabled=false \
---conf 
spark.sql.catalog.${sparkSeedCatalogName}.s3.endpoint=http://${externalEnvIp}:${minioPort}
 \
+--conf 
spark.sql.catalog.${sparkSeedCatalogName}.s3.endpoint=${sparkMinioEndpoint} \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.s3.access-key=${minioAk} \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.s3.secret-key=${minioSk} \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.s3.region=us-east-1 \
 --conf spark.sql.catalog.${sparkSeedCatalogName}.s3.path.style.access=true \
 -e "${escapedSql}" """
-        executeCommand(command, true)
+        executeCommand(command, true, 300)
     }
 
     def assertSystemTableReadable = { String tableExpr, List<String> 
expectedColumns = [], Integer minCount = null ->


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

Reply via email to