Skip to content

Conversation

@AndySung320
Copy link
Contributor

Why are these changes needed?

Remove three functions (AddLogFile, PushLog, WatchLogsLoops) from RayLogHandler that are no longer part of the current implementation.

The current log collection uses:

  • processSessionLatestLogs() - Processes logs on SIGTERM/shutdown
  • WatchPrevLogsLoops() - Watches /tmp/ray/prev-logs for crash recovery
  • processPrevLogsDir() - Directly processes log directories

According to the design document, the collector has evolved:

  • Old approach (removed): Channel-based queueing with AddLogFile() and batch processing with PushLog()
  • Current approach: Event-driven processing with fsnotify, logs flushed on SIGTERM

Related issue number

Closes #4322

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Signed-off-by: AndySung320 <andysung0320@gmail.com>
@AndySung320 AndySung320 changed the title historyserver: remove unused function in RayLogHandler [history server] remove unused function in RayLogHandler Jan 4, 2026
@AndySung320
Copy link
Contributor Author

While removing these functions, I found the some unused fields (LogFiles, PushInterval, LogBatching, HttpClient, SessionDir) also exist in:

  • Storage backends: s3.go, aliyunoss/ray/ray.go
  • Config: types.go
  • CLI flags in main.go
  • Validation: ValidateRayHanderConfig() never called.

They seem to be alpha to beta transition artifacts based on the design doc.

Unclear: SessionDir

  • Log collector has it but uses hardcoded /tmp/ray paths instead
  • Storage backends (s3.go, aliyunoss/ray.go) receive it and compute paths from it
  • Not sure if storage backends use the stored value or if it's also dead code

Should I expand this PR or create follow-up issues? The SessionDir situation needs investigation (does storage backend actually use it vs. should they also use hardcoded paths?).

cc @Future-Outlier would appreciate guidance on scope~

@Future-Outlier
Copy link
Member

While removing these functions, I found the some unused fields (LogFiles, PushInterval, LogBatching, HttpClient, SessionDir) also exist in:

  • Storage backends: s3.go, aliyunoss/ray/ray.go
  • Config: types.go
  • CLI flags in main.go
  • Validation: ValidateRayHanderConfig() never called.

They seem to be alpha to beta transition artifacts based on the design doc.

Unclear: SessionDir

  • Log collector has it but uses hardcoded /tmp/ray paths instead
  • Storage backends (s3.go, aliyunoss/ray.go) receive it and compute paths from it
  • Not sure if storage backends use the stored value or if it's also dead code

Should I expand this PR or create follow-up issues? The SessionDir situation needs investigation (does storage backend actually use it vs. should they also use hardcoded paths?).

cc @Future-Outlier would appreciate guidance on scope~

good question, can you ask this question in the history sever's dev channel in ray's slack?
Thanks!

Copy link
Member

@Future-Outlier Future-Outlier left a comment

Choose a reason for hiding this comment

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

lgtm, thank you

@rueian rueian merged commit d26dbfa into ray-project:master Jan 6, 2026
28 checks passed
@github-project-automation github-project-automation bot moved this from can be merged to Done in @Future-Outlier's kuberay project Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[history server] [collector] remove unused function in RayLogHandler

3 participants