Add daemon and cleanup tools for IoTDB Edge - #18552
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add Edge-specific replacements for the standalone node ops scripts excluded from the Edge distribution in #18538.
tools/ops/daemon-edge.shto registeriotdb-edge.service, optionally start it and enable startup at boot. Preserve the existing restart policy, limits and Java environment support, while usingType=forkingandedge.pidto supervise the JVM launched bystart-edge.sh.tools/ops/destroy-edge.shandtools/windows/ops/destroy-edge.batto stop the merged process before removing local data. Cover the localdestroy-allbehavior and every configurable ConfigNode/DataNode directory handled by the old node cleanup scripts, including system/consensus/data/WAL/tracing/sync/receiver/sort directories, comma/semicolon-separated paths, and legacy configuration-file fallback.-ffor unattended cleanup. Propagate stop/deletion failures, validate cleanup targets before deleting anything, and preserve configuration and logs. On Unix, stop the matching systemd service first to prevent a restart during cleanup.-fhandling and propagate PowerShell failures instop-edge.bat.Verification
python3 .github/scripts/test-edge-ops.py: 24 passed on macOS; the native Windows-only case is skipped locally. The same suite is wired into both Ubuntu and Windows CI.Edge CI: Ubuntu ops regression tests (including systemd unit verification), native Windows ops regression tests, and the existing Windows launcher tests all passed.
bash -nand ShellCheck 0.11.0: passed for both new shell scripts.mvn -B -ntp clean package -pl distribution -am -DskipTests: all 37 reactor modules passed.Inspected the built ZIPs: all three new scripts are present in Edge with mode
0755and identical to source, absent from all/DataNode/ConfigNode packages, and the removed standalone ops scripts remain absent from Edge.Started the built Edge package with JDK 17 in an isolated temporary installation, using custom ConfigNode/DataNode directories and two absolute data directories outside the installation. Created, inserted, flushed and queried both tree-model and table-model data successfully. Ran the packaged
destroy-edge.sh -fand verified JVM termination, PID-file removal, cleanup of default and configured directories, and preservation of configuration and logs.Self-reviewed.
Added Apache license headers and comments explaining lifecycle/cleanup behavior.
Added regression tests and CI coverage.