-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function notifies losing LNS with a direct method #1577
Conversation
- LNS marks itself as the losing one and drops the connection - Unit, integration + simulation tests.
LoRaEngine/modules/LoRaWanNetworkSrvModule/LoRaWan.NetworkServer/LoRaDeviceClient.cs
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## dev #1577 +/- ##
==========================================
+ Coverage 86.46% 86.54% +0.07%
==========================================
Files 235 235
Lines 9201 9258 +57
==========================================
+ Hits 7956 8012 +56
- Misses 1245 1246 +1
Continue to review full report at Codecov.
|
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Outdated
Show resolved
Hide resolved
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Outdated
Show resolved
Hide resolved
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Outdated
Show resolved
Hide resolved
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Outdated
Show resolved
Hide resolved
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Show resolved
Hide resolved
LoRaEngine/LoraKeysManagerFacade/FunctionsBundler/DeduplicationExecutionItem.cs
Outdated
Show resolved
Hide resolved
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Outdated
Show resolved
Hide resolved
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Outdated
Show resolved
Hide resolved
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logging is too verbose and I think we should add a metric tracking the ownership changes. That would allow an operator to track aggressive connection changes and alert on them.
Generally: When Mark strategy is configured, I think we could end up in a situation, where every message (worst case) does switch the connection. We could end up in a scenario, where we have a lot of direct methods going to the edge to request the closing of the connection. I'm not sure this is a concern really, as we make it clear that Mark should not be used in general, but on only for specific devices.
- removes extra logs/scope - renames from drop connection to close
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Show resolved
Hide resolved
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Outdated
Show resolved
Hide resolved
...etworkSrvModule/LoRaWan.NetworkServer/BasicsStation/ModuleConnection/ModuleConnectionHost.cs
Outdated
Show resolved
Hide resolved
The setup was wrong. The real flow would never have to call the API again when the function bundler was executed. In multigw the bundler always is executed and hence, the fcnt is set (to 0 if the message was already handled). This makes sure we actually mock the behavior of the real code executing and simplifies the logic.
PR for issue #1497
What is being addressed
When the winning LNS changes on the function side, we have to inform the losing LNS proactively that it lost the race. The reason why we do this is in order for its Edge Hub to not retry to create the connection which would result in a connection ping-pong.
How is this addressed
DeduplicationExecutionItem
when a connection switch happens.ModuleConnectionHost
), it sets itself as the losing LNS and closes the connection.ModuleConnectionHostTest
) and the function side (MessageDeduplicationTests
), integration tests for Function (DeduplicationTestWithRedis
) and a simulation test (SimulatedLoadTest
) for the whole flow.Verification
Simulation test in the CI