close
Skip to content

[Improve][Core] Auto-create GC log directory to avoid startup failures#10255

Merged
corgy-w merged 1 commit into
apache:devfrom
zhangshenghang:feature/auto-create-gc-dir
Jan 4, 2026
Merged

[Improve][Core] Auto-create GC log directory to avoid startup failures#10255
corgy-w merged 1 commit into
apache:devfrom
zhangshenghang:feature/auto-create-gc-dir

Conversation

@zhangshenghang

@zhangshenghang zhangshenghang commented Dec 27, 2025

Copy link
Copy Markdown
Member

Purpose of this pull request

Support automatic creation of GC log directory

Changes

Does this PR introduce any user-facing change?

Yes. Users can now enable GC logging without manually creating the log directory first. The directory will be created automatically during startup.

How was this patch tested

  • Created comprehensive test script to verify GC directory creation logic
  • Tested various scenarios: with/without -Xloggc option, nested directories, coexistence with HeapDumpPath
  • Syntax validation for both shell scripts and Windows batch files

Ensure the Xloggc directory exists before starting the JVM to prevent
GC logging failures when the configured directory doesn't exist.

This change adds logic to automatically create the parent directory
of the GC log file path specified by -Xloggc option.

Changes:
- Added GC logging options to jvm_options (commented by default)
- Modified seatunnel.sh to auto-create GC log directory
- Modified seatunnel-cluster.sh to auto-create GC log directory
- Modified seatunnel.cmd to auto-create GC log directory
- Modified seatunnel-cluster.cmd to auto-create GC log directory
@github-actions github-actions Bot added the core SeaTunnel core module label Dec 27, 2025

@LiJie20190102 LiJie20190102 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Please retry CI

@davidzollo davidzollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 if CI passed

@corgy-w corgy-w merged commit 2c563f8 into apache:dev Jan 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved core SeaTunnel core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants