-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Darwin] MTRDeviceController getSessionForNode: to use subscription pool as needed #33856
[Darwin] MTRDeviceController getSessionForNode: to use subscription pool as needed #33856
Conversation
PR #33856: Size comparison from bfa3e6f to e479b8b Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…BaseDevice testing
PR #33856: Size comparison from bfa3e6f to 08bb265 Increases above 0.2%:
Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Co-authored-by: Justin Wood <[email protected]>
PR #33856: Size comparison from bfa3e6f to 643ffcb Increases above 0.2%:
Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@@ -2055,194 +2061,195 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason | |||
}); | |||
} | |||
|
|||
// Call directlyGetSessionForNode because the subscription setup already goes through the subscription pool queue |
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.
So I was figuring we would stop putting the subscription setup in there and just call getSessionForNode and have that get queued.... why are we not doing that?
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.
Subscriptions on controller startup can cause a thundering herd issue with many Thread devices. If we only use the N-pool for getSessionForNode, then as soon as session is established, another device subscription can move forward, and we can get into a situation where many subscriptions and their priming reports are in the air at the same time.
This change makes MTRDeviceController's
-getSessionForNode:completion:
also participate in the subscription pool when there is an MTRDevice associated with the nodeID, and is also known to use Thread.With this change, MTRBaseDevice and MTRBaseClusters reads/subscriptions for devices using Thread would also get the CASE session establishment gated by the subscription pool, and help avoid congesting the Thread network when a controller starts and tries to get status for all its Thread devices.