From bc837b53942fbd00677583b46b0ca1edcf8cbb45 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Wed, 1 Apr 2026 09:02:25 -0500 Subject: [PATCH] pool: Improve logging for hot file replication 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 --- .../dcache/src/main/java/org/dcache/pool/classic/PoolV4.java | 5 +++-- .../main/java/org/dcache/pool/migration/MigrationModule.java | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/dcache/src/main/java/org/dcache/pool/classic/PoolV4.java b/modules/dcache/src/main/java/org/dcache/pool/classic/PoolV4.java index ef6f2cde897..367afe10585 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/classic/PoolV4.java +++ b/modules/dcache/src/main/java/org/dcache/pool/classic/PoolV4.java @@ -752,8 +752,9 @@ private int queueIoRequest(CellMessage envelope, PoolIoFileMessage message) private void ioFile(CellMessage envelope, PoolIoFileMessage message) { try { message.setMoverId(queueIoRequest(envelope, message)); - LOGGER.debug("moverId {} received request for pnfsId {}", message.getMoverId(), - message.getPnfsId()); + LOGGER.debug("moverId {} received request for pnfsId {}, hotfile replication is {}", + message.getMoverId(), message.getPnfsId(), _hotFileReplicationEnabled + ? "enabled" : "disabled"); if (_hotFileReplicationEnabled) { _fileRequestMonitor.reportFileRequest(message.getPnfsId(), _ioQueue.numberOfRequestsFor(message.getPnfsId()), diff --git a/modules/dcache/src/main/java/org/dcache/pool/migration/MigrationModule.java b/modules/dcache/src/main/java/org/dcache/pool/migration/MigrationModule.java index d0b2d1c66a9..87fd4ba8f8e 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/migration/MigrationModule.java +++ b/modules/dcache/src/main/java/org/dcache/pool/migration/MigrationModule.java @@ -1252,12 +1252,15 @@ public Object messageArrived(CellMessage envelope, PoolMigrationJobCancelMessage public synchronized void reportFileRequest(PnfsId pnfsId, long numberOfRequests, ProtocolInfo protocolInfo) { if (numberOfRequests < hotFileThreshold) { + 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()); switch (job.getState()) { case FINISHED: case CANCELLED: