Copilot commented on code in PR #61852:
URL: https://github.com/apache/doris/pull/61852#discussion_r3019314817


##########
docker/thirdparties/docker-compose/hive/scripts/bootstrap/hive3_only.download_dir.list:
##########
@@ -0,0 +1,3 @@
+data/multi_catalog/logs1_parquet/data
+data/multi_catalog/test_complex_types/data

Review Comment:
   `data/multi_catalog/test_complex_types` is treated as a common `run.sh` (see 
`bootstrap_item_group` test expecting `common`), but its download directory is 
listed under `hive3_only`. With Hive2 bootstrap groups (`common,hive2_only`), 
this will skip downloading `data/multi_catalog/test_complex_types/data`, and 
the common `run.sh` will likely fail when it tries to `hadoop fs -put` 
`${CUR_DIR}/data/*`. Consider removing this path from the 
`hive3_only.download_dir.list` (making it `common`), or alternatively marking 
the corresponding `run.sh` as `hive3_only` if it truly is Hive3-specific.
   ```suggestion
   
   ```



##########
docker/thirdparties/run-thirdparties-docker.sh:
##########
@@ -546,6 +555,12 @@ start_hive2() {
     # If the doris cluster you need to test is single-node, you can use the 
default values; If the doris cluster you need to test is composed of multiple 
nodes, then you need to set the IP_HOST according to the actual situation of 
your machine
     #default value
     export CONTAINER_UID=${CONTAINER_UID}
+    export HIVE_BOOTSTRAP_GROUPS="${HIVE2_BOOTSTRAP_GROUPS:-}"
+    echo "Hive2 bootstrap groups: ${HIVE_BOOTSTRAP_GROUPS:-all}"
+    if [[ "${HIVE_FORCE_RESTART:-0}" -eq 0 ]] && docker_hive_stack_reusable 
"${CONTAINER_UID}" "hive2" "${HIVE_BOOTSTRAP_GROUPS:-all}"; then
+        echo "Hive2 stack is already healthy with matching bootstrap groups, 
skip restart"
+        return

Review Comment:
   `HIVE_BOOTSTRAP_GROUPS` treats an empty value as meaning "all" (see 
`bootstrap_normalize_groups`), and this function prints 
`${HIVE_BOOTSTRAP_GROUPS:-all}` accordingly. However, the container will still 
receive `HIVE_BOOTSTRAP_GROUPS=` (empty) via the env file, while 
`docker_hive_stack_reusable` is called with `all` and checks for an exact env 
match. This makes the reuse check fail even though behavior is equivalent. 
Consider normalizing to an explicit value (e.g., export 
`HIVE_BOOTSTRAP_GROUPS=$(bootstrap_normalize_groups ...)`) before 
templating/starting so the container env and the reuse check stay consistent.



##########
docker/thirdparties/run-thirdparties-docker.sh:
##########
@@ -560,6 +575,12 @@ start_hive3() {
     # hive3
     # If the doris cluster you need to test is single-node, you can use the 
default values; If the doris cluster you need to test is composed of multiple 
nodes, then you need to set the IP_HOST according to the actual situation of 
your machine
     export CONTAINER_UID=${CONTAINER_UID}
+    export HIVE_BOOTSTRAP_GROUPS="${HIVE3_BOOTSTRAP_GROUPS:-}"
+    echo "Hive3 bootstrap groups: ${HIVE_BOOTSTRAP_GROUPS:-all}"
+    if [[ "${HIVE_FORCE_RESTART:-0}" -eq 0 ]] && docker_hive_stack_reusable 
"${CONTAINER_UID}" "hive3" "${HIVE_BOOTSTRAP_GROUPS:-all}"; then

Review Comment:
   Same issue as Hive2: when `HIVE3_BOOTSTRAP_GROUPS` is set-but-empty, 
`${HIVE_BOOTSTRAP_GROUPS:-all}` passes `all` into `docker_hive_stack_reusable`, 
but the container env will be `HIVE_BOOTSTRAP_GROUPS=`. Normalizing to an 
explicit group string before exporting/passing to the reuse check would prevent 
unnecessary restarts.
   ```suggestion
       # Normalize bootstrap groups so that unset or empty is treated as "all"
       if [[ -z "${HIVE_BOOTSTRAP_GROUPS}" ]]; then
           export HIVE_BOOTSTRAP_GROUPS="all"
       fi
       echo "Hive3 bootstrap groups: ${HIVE_BOOTSTRAP_GROUPS}"
       if [[ "${HIVE_FORCE_RESTART:-0}" -eq 0 ]] && docker_hive_stack_reusable 
"${CONTAINER_UID}" "hive3" "${HIVE_BOOTSTRAP_GROUPS}"; then
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to