Skip to content

Commit f5bcf71

Browse files
committed
DPL: demote error to warning when dropping on a stop transition
Data might be missing for real here, and dropping the processing of those timeslices is the unfortunate but correct thing to do.
1 parent cd1cb0d commit f5bcf71

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Framework/Core/src/DataRelayer.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,12 @@ void DataRelayer::setOldestPossibleInput(TimesliceId proposed, ChannelIndex chan
307307
if (element.size() != 0) {
308308
if (input.lifetime != Lifetime::Condition && mCompletionPolicy.name != "internal-dpl-injected-dummy-sink") {
309309
didDrop = true;
310-
LOGP(error, "Dropping incomplete {} Lifetime::{} data in slot {} with timestamp {} < {} as it can never be completed.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
310+
auto& state = mContext.get<DeviceState>();
311+
if (state.transitionHandling != TransitionHandlingState::NoTransition && DefaultsHelpers::onlineDeploymentMode()) {
312+
LOGP(warning, "Stop transition requested. Dropping incomplete {} Lifetime::{} data in slot {} with timestamp {} < {} as it will never be completed.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
313+
} else {
314+
LOGP(error, "Dropping incomplete {} Lifetime::{} data in slot {} with timestamp {} < {} as it can never be completed.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
315+
}
311316
} else {
312317
LOGP(debug,
313318
"Silently dropping data {} in pipeline slot {} because it has timeslice {} < {} after receiving data from channel {}."
@@ -326,7 +331,12 @@ void DataRelayer::setOldestPossibleInput(TimesliceId proposed, ChannelIndex chan
326331
}
327332
auto& element = mCache[si * mInputs.size() + mi];
328333
if (element.size() == 0) {
329-
LOGP(error, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
334+
auto& state = mContext.get<DeviceState>();
335+
if (state.transitionHandling != TransitionHandlingState::NoTransition && DefaultsHelpers::onlineDeploymentMode()) {
336+
LOGP(warning, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
337+
} else {
338+
LOGP(error, "Missing {} (lifetime:{}) while dropping incomplete data in slot {} with timestamp {} < {}.", DataSpecUtils::describe(input), input.lifetime, si, timestamp.value, newOldest.timeslice.value);
339+
}
330340
}
331341
}
332342
}

0 commit comments

Comments
 (0)