Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Framework/Core/src/ExternalFairMQDeviceProxy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void sendOnChannel(FairMQDevice& device, FairMQParts& messages, std::string cons
// TODO: we might want to treat this error condition some levels higher up, but for
// the moment its an appropriate solution. The important thing is not to drop
// messages and to be informed about the congestion.
while (device.NewStatePending() == false && device.Send(messages, channel, index, timeout) < 0) {
while (device.Send(messages, channel, index, timeout) < 0) {
if (timeout == 0) {
timeout = 1;
} else if (timeout < maxTimeout) {
Expand All @@ -83,6 +83,15 @@ void sendOnChannel(FairMQDevice& device, FairMQParts& messages, std::string cons
timeout += 1;
}
}
if (device.NewStatePending()) {
LOG(ERROR) << "device state change is requested, dropping " << messages.Size() << " pending message(s)\n"
<< "on channel " << channel << "\n"
<< "ATTENTION: DATA IS LOST! Could not dispatch data to downstream consumer(s), check if\n"
<< "consumers have been terminated too early";
// make sure we disable the warning below
timeout = maxTimeout + 1;
break;
}
}
if (timeout > 0 && timeout <= maxTimeout) {
LOG(WARNING) << "dispatching on channel " << channel << " was delayed by " << timeout << " ms";
Expand Down