Repository navigation
MLT: keep sending TriggerDecisions when one of several DFOs cannot be reached - #448
Open
wesketchum wants to merge 1 commit into
Open
wesketchum wants to merge 1 commit into
wesketchum wants to merge 1 commit into
Conversation
… reached The sends to all DFOs were in one try block, with the trigger number incremented after the loop. Once the send to one DFO failed, the DFOs after it in the map never got the TriggerDecision, and the trigger number was not incremented, so the DFOs before it received the same number again and again. With one DFO dead the system stopped taking data. Catch a failed send for each DFO separately. A TriggerDecision counts as sent, and uses up its trigger number, once any DFO has it; it counts as a failed send only if no DFO could be reached. Co-Authored-By: Claude <noreply@anthropic.com>
7 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With several DFOs, the MLT sends each TriggerDecision to every DFO. In
MLTModule::trigger_decisions_callbackthe sends are in one loop inside onetry, andm_last_trigger_number++is done after the loop. Once the send to one DFO fails (e.g. the DFO died):m_decision_outputsnever get the TriggerDecision, andThis PR makes a minimal change:
try/catch, so a DFO that cannot be reached does not keep the TriggerDecision from the others. The debug message now names the connection that failed.td_queue_timeout_expired_err_count, per-typefailed_send) only if no DFO could be reached, and the number is then reused, as ondevelopwith one DFO.With a single DFO, behavior is unchanged.
Not in this PR: dropping a dead DFO from
m_decision_outputs(while one is dead, the MLT logs one ERROR and waits up to the 1 ms send timeout for each TriggerDecision), and the singlem_dfo_is_busyflag shared by all DFOs. Whether a failed send should use up its trigger number is also a separate issue.All the usual tests pass, but don't really test the code as they don't use multiple DFOs.
To really test: dfmodules'
integtest/dfo_protocol_killed_dfo_test.py(from the dfmodules multi-DFO fix branch, to be linked: DUNE-DAQ/dfmodules#527) kills one of three DFOs while triggers are enabled. Without this PR the run stalls after the kill. With it, the run continues at the normal rate.Type of change
Testing checklist
dbt-build --unittest)pytest -s minimal_system_quick_test.py)dunedaq_integtest_bundle.sh)python -m pytest)pre-commit run --all-files)Further checks
dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)