test: Write embedded test task logs to the main logger.#19428
Conversation
In production, Indexers write task logs to their own dedicated files in order to make them separately uploadable and viewable. In embedded tests, it's better to write task logs to the main log file, to keep all logging output for the test run in one place.
FrankChen021
left a comment
There was a problem hiding this comment.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 0 |
| P2 | 1 |
| P3 | 0 |
| Total | 1 |
This is an automated review by Codex GPT-5
| final File taskFile = new File(taskDir, "task.json"); | ||
| final File reportsFile = new File(attemptDir, "report.json"); | ||
| final File logFile = new File(taskDir, "log"); | ||
| final File logFile = |
There was a problem hiding this comment.
[P2] Disabling task log files does not stop appenderator log routing
When druid.worker.useSeparateTaskLogFiles=false, the runner skips the task log file here, but ingestion tasks that create appenderators can still install per-task log routing through UnifiedIndexerAppenderatorsManager, whose override unconditionally calls Appenderators.setTaskThreadContextForIndexers(taskId, taskDirectory.getTaskLogFile(taskId)). BatchAppenderator and StreamAppenderator invoke that override on persist/push/background executor paths, so those logs can still be routed to per-task files instead of only the Indexer process log. The new flag needs to be honored by the appenderator manager/override as well.
FrankChen021
left a comment
There was a problem hiding this comment.
Reviewed 6 of 6 changed files for correctness, edge cases, concurrency, and integration risks; no issues found.
This is an automated review by Codex GPT-5
In production, Indexers write task logs to their own dedicated files in order to make them separately uploadable and viewable. In embedded tests, it's better to write task logs to the main log file, to keep all logging output for the test run in one place.
In production, Indexers write task logs to their own dedicated files in order to make them separately uploadable and viewable. In embedded tests, it's better to write task logs to the main log file, to keep all logging output for the test run in one place.