[Bug] health_check.bat creates a stray empty directory (e.g. C:\Program) when the install path contains a space
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- shell
- Lĩnh vực
- operating-systems, tooling
Hướng nghiên cứu
Bắt đầu trong scripts/tools/windows/ops/health_check.bat, tập trung vào routine :local_dirs_check và việc lặp qua các thư mục của routine này. Tái hiện với IoTDB được cài đặt trong một đường dẫn có chứa khoảng trắng, sau đó xác minh rằng tools\windows\ops\health_check.bat -o local báo cáo mỗi thư mục đã cấu hình dưới dạng một đường dẫn duy nhất và không tạo thư mục thừa nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I searched in the issues and found nothing similar.
Version
Reproduced on 2.0.8 and current master (identical code). Present since the tool was introduced (#12325); not addressed by #12435 (launch scripts) or #12450 (permission-detection logic).
Environment:
- OS: Windows (reproduces wherever the install path contains a space)
- IoTDB: 2.0.8 and master
Describe the bug and provide the minimal reproduce step
On Windows, if IoTDB is located under a path that contains a space (e.g. C:\Program Files\iotdb), the health-check tool's Installation Environment(Directory Access) check splits directory paths at the space. It:
- creates a stray empty directory such as
C:\Program, and - prints garbled results - e.g.
"C:\Program" has write permissionfollowed by"Files\...\ext\pipe" has write permission- instead of one line for the real directory.
To reproduce:
- Unzip/install IoTDB into a path containing a space, e.g.
C:\Program Files\iotdb(orC:\test dir\iotdb). - Run
tools\windows\ops\health_check.bat -o local. - Observe a stray empty
C:\Programdirectory, and split/garbled lines in the Directory Access section.
Any configured directory under the spaced install path triggers it; the ext/* dirs (pipe_lib_dir / udf_lib_dir / trigger_lib_dir) hit it by default because they resolve to %IOTDB_HOME%\ext\....
Affected file: scripts/tools/windows/ops/health_check.bat, routine :local_dirs_check.
Root cause:
:local_dirs_check joins the directory variables into spacedirs with spaces and iterates with for %%a in (%spacedirs%). The for ... in (set) form tokenizes on spaces (and ,/;), so a path containing a space is split into two
tokens. The inner for %%b/%%c loops already preserve spaces for the ;/, multi-dir separators via the "!var:;=" "!" technique, but the outer space-join defeats that. Separately, %%c (from for %%c in ("...")) still carries its
surrounding quotes, so mkdir "%%c" expands to mkdir ""C:\Program Files\..."" - a doubly-quoted path the argument parser re-splits.
What did you expect to see?
Each configured directory is checked as a single path; no stray directory is created; the output has one clean line per directory.
What did you see instead?
The tool splits directory paths at the space and creates a stray directory.
Anything else?
The docs recommend a space-free install path, but the tool shouldn't create stray directories or emit corrupt output when that guidance isn't met - especially since Windows users frequently install under C:\Program Files. A minimal fix is
available (see PR).
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Ngôn ngữ chính
- Java
- Star
- 6.4k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 149
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/iotdb
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] sbin/replace-conf-from-env.sh word-splits the whole environment and corrupts iotdb-system.propertiesCó thể đã có người làm @anishmehta24 đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/iotdb#18655 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successCó thể đã có người làm @PDGGK đã nhận 35 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] 执行start-all.sh后无法启动集群问题Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column nameCó thể đã có người làm @PDGGK đã nhận 77 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
[destination-snowflake] Custom domains rejected unlike source connectionsCó thể đã có người làm @kuza55 đã nhận hôm nay. Đang mởautoteam community connectors/destination/snowflake team/use
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
component/operate kind/feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Forge coverage prompts carry text the agent cannot act onCó thể đã có người làm @graalvmbot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
oracle/graalvm-reachability-metadata#10572 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Có thể đã có người làm @MarkAlex1234 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày