@@ -1054,11 +1054,19 @@ void DataProcessingDevice::fillContext(DataProcessorContext& context, DeviceCont
10541054 }
10551055
10561056 auto decideEarlyForward = [&context, &deviceContext, &spec, this ]() -> ForwardPolicy {
1057- // ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_OLD_EARLY_FORWARD") ? ForwardPolicy::AtCompletionPolicySatisified : ForwardPolicy::AtInjection;
1058- // Make the new policy optional until we handle some of the corner cases
1059- // with custom policies which expect the early forward to happen only when
1060- // all the data is available, like in the TPC case.
1061- ForwardPolicy defaultEarlyForwardPolicy = getenv (" DPL_NEW_EARLY_FORWARD" ) ? ForwardPolicy::AtInjection : ForwardPolicy::AtCompletionPolicySatisified;
1057+ ForwardPolicy defaultEarlyForwardPolicy = getenv (" DPL_OLD_EARLY_FORWARD" ) ? ForwardPolicy::AtCompletionPolicySatisified : ForwardPolicy::AtInjection;
1058+ // FIXME: try again with the new policy by default.
1059+ //
1060+ // Make the new policy optional until we handle some of the corner cases
1061+ // with custom policies which expect the early forward to happen only when
1062+ // all the data is available, like in the TPC case.
1063+ // ForwardPolicy defaultEarlyForwardPolicy = getenv("DPL_NEW_EARLY_FORWARD") ? ForwardPolicy::AtInjection : ForwardPolicy::AtCompletionPolicySatisified;
1064+ for (auto & forward : spec.forwards ) {
1065+ if (DataSpecUtils::match (forward.matcher , ConcreteDataTypeMatcher{" TPC" , " DIGITSMCTR" }) ||
1066+ DataSpecUtils::match (forward.matcher , ConcreteDataTypeMatcher{" TPC" , " CLNATIVEMCLBL" })) {
1067+ defaultEarlyForwardPolicy = ForwardPolicy::AtCompletionPolicySatisified;
1068+ }
1069+ }
10621070
10631071 // / We must make sure there is no optional
10641072 // / if we want to optimize the forwarding
0 commit comments