feat: retry pending fault propagation to disconnected peers#679
Merged
Conversation
Contributor
ST-LIB Release Plan
Pending changes
|
d9d2f2b to
3068097
Compare
3068097 to
e469a2d
Compare
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.
Summary
Follow-up to #676. When
propagate_fault()fails to send the FAULT order (e.g. TCP connection not yet established), the target is markedpendingand retried automatically fromcheck_transitions()while the board remains faulted.Changes
FaultController.hppbool pendingtoFaultPropagationTargetstructretry_pending_fault_propagation()private method declarationFaultController.cpp#include "HALAL/Services/Time/Scheduler.hpp"fault_propagation_retry_period_usconstant (100ms)propagate_fault(): setspending = truebefore sending, clears on success. Warning message updated to "will retry".retry_pending_fault_propagation(): iterates targets, retriessend_order()for pending ones, clearspendingon success.check_transitions(): callsretry_pending_fault_propagation()whenfaultedunderSTLIB_ETH, throttled to every 100ms viaScheduler::get_global_tick().Behavior
propagate_fault()sends to all, allpending = false, retry is a no-oppropagate_fault()marks disconnected aspending. Retried every 100ms until TCP comes up and send succeedspending. Retried every 100ms until connections establishRetry is throttled to 100ms to avoid hammering the TCP stack in the tight main loop. No new public API — retry is driven automatically from
check_transitions()which the application already calls in its main loop.