-
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
[OTA-R] Correct the implementation of mProviderRetryCount #18908
Merged
Conversation
This file contains 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
- scripts/helpers/restyle-diff.sh
pullapprove
bot
requested review from
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
erjiaqing,
franck-apple,
gjc13,
harimau-qirex,
hawk248,
harsha-rajendran,
jelderton,
jepenven-silabs,
jmartinez-silabs,
jtung-apple,
kghost,
kpschoedel and
lazarkov
May 27, 2022 18:16
pullapprove
bot
requested review from
tecimovic,
selissia,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21,
yufengwangca and
yunhanw-google
May 27, 2022 18:16
isiu-apple
changed the title
Issue 18824
[OTA-R] Correct the implementation of mProviderRetryCount
May 27, 2022
PR #18908: Size comparison from dbc91b7 to e7b3062 Increases (4 builds for cc13x2_26x2, efr32, linux, nrfconnect)
Decreases (1 build for cc13x2_26x2)
Full report (37 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
tcarmelveilleux
approved these changes
May 27, 2022
carol-apple
reviewed
May 27, 2022
- Remove reset from DefaultOTARequestorDriver::UpdateDownloaded()
carol-apple
approved these changes
Jun 2, 2022
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.
Problem
mProviderRetryCount
was not implemented correctly. For example:So the current code doesn't properly reset
mProviderRetryCount
after a successful download but image is not applied. Given that we now have two retry counters and they are incremented in different locations, we could be incrementingmProviderRetryCount
even on an invalid session error:mProviderRetryCount
incremented to 1)mInvalidSessionRetryCount
incremented to 1 inHandleIdleStateEnter
mProviderRetryCount
incremented to 2 inSendQueryImage
Given the current example app, after (5), we could get a successful query/download but never applied the image. The next time we attempt to query (and if it were busy),
mProviderRetryCount
already started at 2 instead of 0 and it would at most retry one more time.Fixes: #18824
Change overview
Reset
mProviderRetryCount
to zero when QueryImage download has succeeded.Testing
Ran QueryImage tests and verified that
mProviderRetryCount
is reset to zero upon successful QueryImage download.