Skip to content

Commit b5944fd

Browse files
committed
DPL: reset copy on forward
1 parent 72b9f51 commit b5944fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,15 @@ auto decongestionCallbackLate = [](AsyncTask& task, size_t aid) -> void {
658658
// to the next one in the daisy chain.
659659
// FIXME: do it in a smarter way than O(N^2)
660660
static auto forwardInputs = [](ServiceRegistryRef registry, TimesliceSlot slot, std::vector<MessageSet>& currentSetOfInputs,
661-
TimesliceIndex::OldestOutputInfo oldestTimeslice, bool copy, bool consume = true) {
661+
TimesliceIndex::OldestOutputInfo oldestTimeslice, const bool copyByDefault, bool consume = true) {
662662
auto& proxy = registry.get<FairMQDeviceProxy>();
663663
// we collect all messages per forward in a map and send them together
664664
std::vector<fair::mq::Parts> forwardedParts;
665665
forwardedParts.resize(proxy.getNumForwards());
666666
std::vector<ChannelIndex> cachedForwardingChoices{};
667667
O2_SIGNPOST_ID_GENERATE(sid, forwarding);
668668
O2_SIGNPOST_START(forwarding, sid, "forwardInputs", "Starting forwarding for slot %zu with oldestTimeslice %zu %{public}s%{public}s%{public}s",
669-
slot.index, oldestTimeslice.timeslice.value, copy ? "with copy" : "", copy && consume ? " and " : "", consume ? "with consume" : "");
669+
slot.index, oldestTimeslice.timeslice.value, copyByDefault ? "with copy" : "", copyByDefault && consume ? " and " : "", consume ? "with consume" : "");
670670

671671
for (size_t ii = 0, ie = currentSetOfInputs.size(); ii < ie; ++ii) {
672672
auto& messageSet = currentSetOfInputs[ii];
@@ -677,10 +677,10 @@ static auto forwardInputs = [](ServiceRegistryRef registry, TimesliceSlot slot,
677677
if (!toBeForwardedHeader(messageSet.header(0)->GetData())) {
678678
continue;
679679
}
680+
bool copy = copyByDefault;
680681
cachedForwardingChoices.clear();
681682

682-
for (size_t pi = 0; pi < currentSetOfInputs[ii].size(); ++pi) {
683-
auto& messageSet = currentSetOfInputs[ii];
683+
for (size_t pi = 0; pi < messageSet.size(); ++pi) {
684684
auto& header = messageSet.header(pi);
685685
auto& payload = messageSet.payload(pi);
686686
auto total = messageSet.getNumberOfPayloads(pi);

0 commit comments

Comments
 (0)