@@ -68,18 +68,19 @@ DataRelayer::DataRelayer(const CompletionPolicy& policy,
6868 }
6969}
7070
71- void DataRelayer::processDanglingInputs (std::vector<ExpirationHandler> const & expirationHandlers,
71+ bool DataRelayer::processDanglingInputs (std::vector<ExpirationHandler> const & expirationHandlers,
7272 ServiceRegistry& services)
7373{
7474 // / Nothing to do if nothing can expire.
7575 if (expirationHandlers.empty ()) {
76- return ;
76+ return false ;
7777 }
7878 // Create any slot for the time based fields
7979 std::vector<TimesliceSlot> slotsCreatedByHandlers;
8080 for (auto & handler : expirationHandlers) {
8181 slotsCreatedByHandlers.push_back (handler.creator (mTimesliceIndex ));
8282 }
83+ bool didWork = slotsCreatedByHandlers.empty () == false ;
8384 // Outer loop, we process all the records because the fact that the record
8485 // expires is independent from having received data for it.
8586 for (size_t ti = 0 ; ti < mTimesliceIndex .size (); ++ti) {
@@ -114,11 +115,13 @@ void DataRelayer::processDanglingInputs(std::vector<ExpirationHandler> const& ex
114115 assert (ti * mDistinctRoutesIndex .size () + expirator.routeIndex .value < mCache .size ());
115116 assert (expirator.handler );
116117 expirator.handler (services, part, timestamp.value );
118+ didWork = true ;
117119 mTimesliceIndex .markAsDirty (slot, true );
118120 assert (part.header != nullptr );
119121 assert (part.payload != nullptr );
120122 }
121123 }
124+ return didWork;
122125}
123126
124127// / This does the mapping between a route and a InputSpec. The
0 commit comments