#36373 init: log resolved datadir path
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36373 init: log resolved datadir path | Ready | 0 | Crickets | 6 | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Logs the symlink-resolved canonical path of the active data directory during node startup logging. The resolved path is printed unconditionally on a separate line immediately following the configured data directory line.
Problem: When the data directory or its parent paths contain symlinks, startup logs only print the configured path. Users and developers analyzing saved debug.log files cannot verify the actual underlying storage device or directory used during that run.
Evidence of importance:
- Author description: 'I've been testing a potential performance PR across different data directories (for example, SSD versus HDD). After each run, I save the debug.log file. It would be nice if the debug.log file showed which data directory was used for that run.'
- Author description: 'If a script starts bitcoind (e.g., on an RPi with a whole infrastructure, like Umbrel or myNode), changing the startup command arguments may be inconvenient or not even possible. It's easy to change the default directory to be a symlink. But in that case, debug.log doesn't show where the actual data directory is located.'
Risk of a mistake: low. Touches only startup logging using standard filesystem canonicalization with an error code fallback.
Changed since the previous assessment: The new version unconditionally logs the 'Resolved data directory' line on every startup instead of only printing it when the canonical path differs from the configured path, ensuring log parsers can rely on the line being present.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- reviewer: input from reviewers on whether logging the resolved datadir line should be conditional or always printed 2026-10-08
Agreement
Crickets
no substantive comment either way
Thread notes: Initial review by l0rinc questioned scope and suggested avoiding duplicate log lines when paths match. The author clarified scope and is awaiting further reviewer feedback before deciding whether to make the log line conditional.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| l0rinc (member) | question, scope | asks if this is part of a broader effort to improve symlink support | answered · author replied that it is a self-contained PR, not part of a broader effort | answered | yes | 2026-10-08: 'Is this part of a broader effort to improve symlink support?' Status from: 2026-10-08: LarryRuane: 'No, I'm not thinking this is part of a broader effort to improve symlink support.' |
| l0rinc (member) | suggestion, interface | avoid logging two separate lines for the same directory when it is not a symlink | answered · author explained the scripting rationale, stated openness to making it conditional, and asked to wait for more opinions | answered | yes | 2026-10-08: 'I wouldn't want to see two separate log lines for the exact same folder in 99% of cases.' Status from: 2026-10-08: LarryRuane: 'I can make the logging of that Resolved line conditional so it doesn't print the same path as the Using line, maybe I'll wait for a few more opinions.' |
Participants:
- l0rinc (member, question, 1 statements 2026-10-08 to 2026-10-08): asked whether this is part of broader symlink support and preferred not having redundant log lines
Files
0 lines under test/bench/ci.
- src/init/common.cpp +6/-1
Card
The short text the ranking pass compares across PRs.
Logs the symlink-resolved canonical data directory during node startup immediately after the configured path. This makes saved debug.log files reflect the physical storage directory used when running bitcoind via symlinked paths. The author notes this assists benchmarking across different storage media when wrapper scripts prevent modifying startup flags. No dependencies.
Data
thread read through 2026-10-08 (2 statements), head 21e37651cc
labels: none
Categories
Utilities (logging, arguments, libraries)
P4 · user request
Adds an informational startup log line displaying the resolved canonical datadir path. While convenient for analyzing debug logs when symlinks are involved ('shows which data directory was used for that run'), it is a minor diagnostic logging improvement with no effect on node behavior or stability.
Membership: Touches node startup logging in src/init/common.cpp by logging the symlink-resolved data directory path.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 0