Skip to content

pool: Improve logging for hot file replication#8061

Merged
mksahakyan merged 1 commit into11.2from
fix/11.2/RB-14655
Apr 2, 2026
Merged

pool: Improve logging for hot file replication#8061
mksahakyan merged 1 commit into11.2from
fix/11.2/RB-14655

Conversation

@greenc-FNAL
Copy link
Copy Markdown
Contributor

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

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
Copilot AI review requested due to automatic review settings April 1, 2026 21:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +1255 to +1263
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());
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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());

Copilot uses AI. Check for mistakes.
try {
Job job = _jobs.get(jobId);
if (job != null) {
LOGGER.debug("hotfile replication : found job with jobid {} in state {}", jobId, job.getState());
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@mksahakyan mksahakyan merged commit faec79f into 11.2 Apr 2, 2026
11 of 14 checks passed
@mksahakyan mksahakyan deleted the fix/11.2/RB-14655 branch April 2, 2026 07:43
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.

3 participants