Skip to content

Commit 9610896

Browse files
committed
DPL: improve logs for new calibration scheme
- Report correct timeout for readers. - Improve message when dropping data which is not going to be processed by the CalibrationOnly mode.
1 parent 3961e74 commit 9610896

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,10 +1395,11 @@ void DataProcessingDevice::Run()
13951395
O2_SIGNPOST_EVENT_EMIT(calibration, lid, "timer_setup", "Starting %d s timer for exitTransitionTimeout.",
13961396
deviceContext.exitTransitionTimeout);
13971397
uv_timer_start(deviceContext.gracePeriodTimer, on_transition_requested_expired, deviceContext.exitTransitionTimeout * 1000, 0);
1398-
if (mProcessingPolicies.termination == TerminationPolicy::QUIT) {
1399-
O2_SIGNPOST_EVENT_EMIT_INFO(device, lid, "run_loop", "New state requested. Waiting for %d seconds before quitting.", (int)deviceContext.exitTransitionTimeout);
1398+
int timeout = hasOnlyGenerated(spec) ? deviceContext.dataProcessingTimeout : deviceContext.exitTransitionTimeout;
1399+
if (mProcessingPolicies.termination == TerminationPolicy::QUIT && DefaultsHelpers::onlineDeploymentMode() == false) {
1400+
O2_SIGNPOST_EVENT_EMIT_INFO(device, lid, "run_loop", "New state requested. Waiting for %d seconds before quitting.", timeout);
14001401
} else {
1401-
O2_SIGNPOST_EVENT_EMIT_INFO(device, lid, "run_loop", "New state requested. Waiting for %d seconds before switching to READY state.", (int)deviceContext.exitTransitionTimeout);
1402+
O2_SIGNPOST_EVENT_EMIT_INFO(device, lid, "run_loop", "New state requested. Waiting for %d seconds before switching to READY state.", timeout);
14021403
}
14031404
} else {
14041405
state.transitionHandling = TransitionHandlingState::Expired;

Framework/Core/src/DataRelayer.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11+
#include "Framework/DeviceState.h"
1112
#include "Framework/RootSerializationSupport.h"
1213
#include "Framework/DataRelayer.h"
1314
#include "Framework/DataProcessingStats.h"
@@ -43,6 +44,7 @@
4344
#include <Monitoring/Metric.h>
4445
#include <Monitoring/Monitoring.h>
4546

47+
#include <fairlogger/Logger.h>
4648
#include <fairmq/Channel.h>
4749
#include <fmt/format.h>
4850
#include <fmt/ostream.h>
@@ -335,7 +337,11 @@ void DataRelayer::setOldestPossibleInput(TimesliceId proposed, ChannelIndex chan
335337
if (element.size() == 0) {
336338
auto& state = mContext.get<DeviceState>();
337339
if (state.transitionHandling != TransitionHandlingState::NoTransition && DefaultsHelpers::onlineDeploymentMode()) {
338-
LOGP(warning, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
340+
if (state.allowedProcessing == DeviceState::CalibrationOnly) {
341+
LOGP(info, "Missing {} (lifetime:{}) while dropping non-calibration data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
342+
} else {
343+
LOGP(warn, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
344+
}
339345
} else {
340346
LOGP(error, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
341347
}

0 commit comments

Comments
 (0)