Adding support of transient federates#2213
Conversation
edwardalee
left a comment
There was a problem hiding this comment.
Looks great! The tests are quite nice. I wonder whether they will prove flaky, since there is always a risk of the launched federates taking an indeterminate amount of time to launch. Have you seen any flaky failures?
cmnrd
left a comment
There was a problem hiding this comment.
I have significant concerns about this approach, and I don't think that we should merge this lightheartedly without being clear about the benefits and the costs. See my comment in the discussion thread for an explanation.
I agree that there are chances of having the tests prove flaky... But I have not encountered such a case so far on my machine. As a proactive workaround, I increased the timeout in this commit 3503ee1. |
Thanks for the feedback, Christian! |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…ut the coordination and the target
…nerator.java Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
…sts and reduce redundancy
… of launching time in transient federates. This is simply done by increasing the timeout to 3s instead of 2s, and adjusting the check accordingly
…efault maxwait is forever
_p2p_connection_is_transient. Use tags instead of boolean s
…of the dSTART_DELAY
…nd stp violation free
…tDownstreamWithTimer.lf test
…tDownstreamWithTwoUpstream.lf test
…tWithPhysicalConnection.lf test
This PR replaces #1695.
The companion PR in
reactor-cis lf-lang/reactor-c#358.It implements the transient feature in the federation execution. Details of the implementation are documented in Discussion #2212.
Merged #2609
This PR builds on the centralized transient support and extends the LF federated runtime to support transient federates under decentralized coordination, where all connections are P2P and no RTI message
forwarding occurs. It also adds support for physical connections involving transient federates under centralized coordination, which are P2P connections.
Companion PR in
reactor-c: #574LF compiler (
lingua-franca)Code generation (
CExtension.java)lf_connect_to_federate()now takes an additionalis_transientparameter. The difference in behavior is documented in the companion PR.inbound_p2p_connection_is_transient[NUMBER_OF_FEDERATES]andoutbound_p2p_connection_is_transient[NUMBER_OF_FEDERATES], so the runtime can track which outbound peers are transient.Tests
All transient tests are under
test/C/src/federated/transient/. New tests:DecentralizedTransientDownstreamWithTimer.lf— transient upstream, persistent outbound, decentralized coordination.DecentralizedTransientDownstreamWithTwoUpstream.lf— transient with two inbound federates (one persistent, one transient), authenticated.DecentralizedTransientStatePersistence.lf— verifies that state is correctly carried across re-joins.DecentralizedTransientHotSwap.lf— hot-swap of a transient federate under decentralized coordination.DecentralizedTransientWithPhysicalConnection.lfTransientWithPhysicalConnection.lfPossible future improvements