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 fe65d35ade0 branch-4.1: [fix](regression) Initialize OceanBase test 
data explicitly #66141 (#66155)
fe65d35ade0 is described below

commit fe65d35ade0daae04f3a939a02d9012a1f10f295
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jul 30 09:15:39 2026 +0800

    branch-4.1: [fix](regression) Initialize OceanBase test data explicitly 
#66141 (#66155)
    
    Cherry-picked from #66141
    
    Co-authored-by: wudi <[email protected]>
---
 .../docker-compose/oceanbase/oceanbase.yaml.tpl    | 29 ++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/docker/thirdparties/docker-compose/oceanbase/oceanbase.yaml.tpl 
b/docker/thirdparties/docker-compose/oceanbase/oceanbase.yaml.tpl
index fee16e3c160..dc8b6de1225 100644
--- a/docker/thirdparties/docker-compose/oceanbase/oceanbase.yaml.tpl
+++ b/docker/thirdparties/docker-compose/oceanbase/oceanbase.yaml.tpl
@@ -30,12 +30,37 @@ services:
       - ${DOCKER_OCEANBASE_EXTERNAL_PORT}:2881
       - ${DOCKER_OCEANBASE_PROXY_EXTERNAL_PORT}:2883
     healthcheck:
-      test: ["CMD-SHELL", "obclient -h127.0.0.1 -P2881 -uroot@test -p123456 -e 
'SELECT * FROM doris_test.all_types LIMIT 1' >/dev/null && obclient -h127.0.0.1 
-P2883 -uroot@test -p123456 -Nse 'SHOW MASTER STATUS' | grep -q ."]
+      test: ["CMD-SHELL", "obclient -h127.0.0.1 -P2881 -uroot@test -p123456 -e 
'SELECT 1' >/dev/null && obclient -h127.0.0.1 -P2883 -uroot@test -p123456 -Nse 
'SHOW MASTER STATUS' | grep -q ."]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+    networks:
+      - doris--oceanbase
+
+  doris--oceanbase-init:
+    image: quay.io/oceanbase/obbinlog-ce:4.2.5-test
+    depends_on:
+      doris--oceanbase:
+        condition: service_healthy
+    entrypoint:
+      - /bin/bash
+      - -c
+      - |
+        set -euo pipefail
+        rm -f /tmp/oceanbase_initialized
+        for sql in /root/boot/init.d/*.sql; do
+          echo "Running $${sql}"
+          obclient -hdoris--oceanbase -P2881 -uroot@test -p123456 < "$${sql}"
+        done
+        touch /tmp/oceanbase_initialized
+        exec tail -f /dev/null
+    healthcheck:
+      test: ["CMD-SHELL", "test -f /tmp/oceanbase_initialized && obclient 
-hdoris--oceanbase -P2881 -uroot@test -p123456 -Nse 'SELECT 1 FROM 
doris_test.all_types LIMIT 1' | grep -q '^1$$'"]
       interval: 5s
       timeout: 60s
       retries: 120
     volumes:
-      - ./init:/root/boot/init.d
+      - ./init:/root/boot/init.d:ro
     networks:
       - doris--oceanbase
 


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

Reply via email to