pool: Improve logging for hot file replication#8061
Conversation
Motivation: To facilitate debug of user reports regarding hot file replication. Modification: - Add enablement information to mover request debug messages. - Add new debug messages to `MigrationModule.reportFileRequests()` on: - NOP due to failure to exceed replication threshold. - Discovery of an existing hot file replication job for the same `PnfsId`. Result: Improved logging for diagnostic purposes when addressing user reports of hot file replication issues. Target: master Request: 11.2 Patch: https://rb.dcache.org/r/14655/diff/raw Closes: Requires-notes: yes Requires-book: no Acked-by: Dmitry Litvintsev
There was a problem hiding this comment.
Pull request overview
Improves debug logging around hot file replication to help diagnose user-reported replication issues.
Changes:
- Log when hot-file replication is skipped because the request threshold is not met.
- Log when a hot-file replication job already exists for the same file (including job state).
- Add hot-file replication enablement status to mover request debug logs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
modules/dcache/src/main/java/org/dcache/pool/migration/MigrationModule.java |
Adds debug logs for hot-file replication threshold short-circuiting and detecting existing jobs. |
modules/dcache/src/main/java/org/dcache/pool/classic/PoolV4.java |
Extends mover request debug logging to include whether hot-file replication is enabled. |
| LOGGER.debug("hotfile replication : conditions not satisfied numberOfRequests {} < hotFileThreshold {}", | ||
| numberOfRequests, hotFileThreshold); | ||
| return; | ||
| } | ||
| String jobId = "hotfile-" + pnfsId; | ||
| try { | ||
| Job job = _jobs.get(jobId); | ||
| if (job != null) { | ||
| LOGGER.debug("hotfile replication : found job with jobid {} in state {}", jobId, job.getState()); |
There was a problem hiding this comment.
The new debug message is hard to correlate with a specific request because it omits the pnfsId (and has slightly awkward formatting with a space before the colon). Consider including pnfsId in the log fields and using a consistent prefix like "hotfile replication:" to make this line more actionable when debugging.
| LOGGER.debug("hotfile replication : conditions not satisfied numberOfRequests {} < hotFileThreshold {}", | |
| numberOfRequests, hotFileThreshold); | |
| return; | |
| } | |
| String jobId = "hotfile-" + pnfsId; | |
| try { | |
| Job job = _jobs.get(jobId); | |
| if (job != null) { | |
| LOGGER.debug("hotfile replication : found job with jobid {} in state {}", jobId, job.getState()); | |
| LOGGER.debug("hotfile replication: conditions not satisfied for pnfsId {}: numberOfRequests {} < hotFileThreshold {}", | |
| pnfsId, numberOfRequests, hotFileThreshold); | |
| return; | |
| } | |
| String jobId = "hotfile-" + pnfsId; | |
| try { | |
| Job job = _jobs.get(jobId); | |
| if (job != null) { | |
| LOGGER.debug("hotfile replication: found job for pnfsId {} with jobid {} in state {}", pnfsId, jobId, job.getState()); |
| try { | ||
| Job job = _jobs.get(jobId); | ||
| if (job != null) { | ||
| LOGGER.debug("hotfile replication : found job with jobid {} in state {}", jobId, job.getState()); |
There was a problem hiding this comment.
Minor log-text issue: "jobid" is inconsistent with typical camelCase naming ("jobId"), and the "hotfile replication :" prefix has a space before the colon. Tweaking the message wording would improve readability/searchability in logs.
Motivation:
To facilitate debug of user reports regarding hot file replication.
Modification:
Add enablement information to mover request debug messages.
Add new debug messages to
MigrationModule.reportFileRequests()on:PnfsId.Result:
Improved logging for diagnostic purposes when addressing user reports of
hot file replication issues.
Target: master
Request: 11.2
Patch: https://rb.dcache.org/r/14655/diff/raw
Closes:
Requires-notes: yes
Requires-book: no
Acked-by: Dmitry Litvintsev