Skip to content
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

Add a way to force reporting when setting attr value in ember store. #34521

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

bzbarsky-apple
Copy link
Contributor

When using a QuieterReportingAttribute to track whether reporting is needed, we can end up in a situation where we set a value that we have not reported yet, and then an edge happens that requires reporting to be triggered, without the relevant value changing. In that situation the QuieterReportingAttribute remembers the last-reported value (not just the last-set one), and will return AttributeDirtyState::kMustReport.

What was missing was a way to tell the ember data store "go ahead and report this, even though we are not in fact changing the value". We want that, in this case, since the ember data store just knows the last-set value, not the last-reported one.

When using a QuieterReportingAttribute to track whether reporting is needed, we
can end up in a situation where we set a value that we have not reported yet,
and then an edge happens that requires reporting to be triggered, without the
relevant value changing.  In that situation the QuieterReportingAttribute
remembers the last-reported value (not just the last-set one), and will return
AttributeDirtyState::kMustReport.

What was missing was a way to tell the ember data store "go ahead and report
this, even though we are not in fact changing the value".  We want that, in this
case, since the ember data store just knows the last-set value, not the
last-reported one.
Copy link

github-actions bot commented Jul 25, 2024

PR #34521: Size comparison from ba949bf to 64423be

Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section ba949bf 64423be change % change
bl602 lighting-app bl602 FLASH 1274146 1274146 0 0.0
RAM 95424 95424 0 0.0
bl602+mfd FLASH 1288404 1288404 0 0.0
RAM 95568 95568 0 0.0
bl602+rpc FLASH 1313114 1313114 0 0.0
RAM 103848 103848 0 0.0
bl702 lighting-app bl702 FLASH 1095040 1095040 0 0.0
RAM 15245 15245 0 0.0
bl702+mfd FLASH 1105734 1105734 0 0.0
RAM 15397 15397 0 0.0
bl702+rpc FLASH 1185106 1185106 0 0.0
RAM 24245 24245 0 0.0
bl706-eth FLASH 878084 878340 256 0.0
RAM 27348 27348 0 0.0
bl706-wifi FLASH 1130780 1130780 0 0.0
RAM 14681 14681 0 0.0
bl702l lighting-app bl702l FLASH 1081938 1081938 0 0.0
RAM 21800 21800 0 0.0
bl702l+mfd FLASH 1093200 1093200 0 0.0
RAM 21960 21960 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 800260 800276 16 0.0
RAM 109276 109276 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 816684 816716 32 0.0
RAM 117020 117020 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 808652 808684 32 0.0
RAM 111308 111308 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 762416 762448 32 0.0
RAM 105448 105448 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 747068 747084 16 0.0
RAM 105632 105632 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606670 606686 16 0.0
RAM 204564 204564 0 0.0
lock CC3235SF_LAUNCHXL FLASH 652210 652226 16 0.0
RAM 204836 204836 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 669329 669353 24 0.0
RAM 77740 77740 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 689189 689213 24 0.0
RAM 80380 80380 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 689189 689213 24 0.0
RAM 80380 80380 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 646125 646149 24 0.0
RAM 72808 72808 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609737 609753 16 0.0
RAM 70884 70884 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629365 629381 16 0.0
RAM 73428 73428 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629365 629381 16 0.0
RAM 73428 73428 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625433 625457 24 0.0
RAM 73900 73900 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 645141 645165 24 0.0
RAM 76444 76444 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 645141 645165 24 0.0
RAM 76444 76444 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 593661 593685 24 0.0
RAM 67852 67852 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 613513 613537 24 0.0
RAM 70492 70492 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 613513 613537 24 0.0
RAM 70492 70492 0 0.0
efr32 lighting-app BRD4187C FLASH 927312 927336 24 0.0
RAM 134568 134568 0 0.0
lock-app BRD4338a FLASH 734684 734692 8 0.0
RAM 208004 208004 0 0.0
window-app BRD4187C FLASH 1014772 1014804 32 0.0
RAM 126648 126648 0 0.0
esp32 all-clusters-app c3devkit DRAM 90988 90988 0 0.0
FLASH 1472594 1472620 26 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 117468 117468 0 0.0
FLASH 1541975 1541991 16 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4632 4632 0 0.0
FLASH 2710565 2710589 24 0.0
RAM 125200 125200 0 0.0
all-clusters-app debug unknown 5416 5416 0 0.0
FLASH 5858050 5858074 24 0.0
RAM 494784 494784 0 0.0
all-clusters-minimal-app debug unknown 5312 5312 0 0.0
FLASH 5306984 5307008 24 0.0
RAM 235920 235920 0 0.0
bridge-app debug unknown 5296 5296 0 0.0
FLASH 4707482 4707506 24 0.0
RAM 213664 213664 0 0.0
chip-tool debug unknown 5784 5784 0 0.0
FLASH 12279672 12279696 24 0.0
RAM 548050 548050 0 0.0
chip-tool-ipv6only arm64 unknown 20128 20128 0 0.0
FLASH 10987228 10987260 32 0.0
RAM 597680 597680 0 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11300231 11300255 24 0.0
RAM 544890 544890 0 0.0
fabric-bridge-app debug unknown 4568 4568 0 0.0
FLASH 4453750 4453774 24 0.0
RAM 199024 199024 0 0.0
lighting-app debug+rpc+ui unknown 5968 5968 0 0.0
FLASH 5631569 5631585 16 0.0
RAM 224464 224464 0 0.0
lock-app debug unknown 5232 5232 0 0.0
FLASH 4757948 4757972 24 0.0
RAM 200704 200704 0 0.0
ota-provider-app debug unknown 4608 4608 0 0.0
FLASH 4402410 4402434 24 0.0
RAM 194880 194880 0 0.0
ota-requestor-app debug unknown 4544 4544 0 0.0
FLASH 4540558 4540582 24 0.0
RAM 199416 199416 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 2991629 2991645 16 0.0
RAM 153896 153896 0 0.0
thermostat-no-ble arm64 unknown 9208 9208 0 0.0
FLASH 4259812 4259844 32 0.0
RAM 236360 236360 0 0.0
tv-app debug unknown 5504 5504 0 0.0
FLASH 5983085 5983101 16 0.0
RAM 573856 573856 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10491197 10491229 32 0.0
RAM 633352 633352 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503444 1503444 0 0.0
RAM 226720 226720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 889076 889096 20 0.0
RAM 141596 141596 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 957296 957344 48 0.0
RAM 140700 140700 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 832696 832716 20 0.0
RAM 140464 140464 0 0.0
nxp contact k32w0+release FLASH 576100 576164 64 0.0
RAM 70104 70104 0 0.0
k32w1+release FLASH 591808 591832 24 0.0
RAM 74144 74144 0 0.0
light k32w0+release FLASH 611696 611712 16 0.0
RAM 69608 69608 0 0.0
k32w1+release FLASH 676528 676560 32 0.0
RAM 82912 82912 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613124 1613140 16 0.0
RAM 209768 209768 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1533476 1533492 16 0.0
RAM 206584 206584 0 0.0
light cy8ckit_062s2_43012 FLASH 1460500 1460516 16 0.0
RAM 199848 199848 0 0.0
lock cy8ckit_062s2_43012 FLASH 1459668 1459684 16 0.0
RAM 224328 224328 0 0.0
qpg lighting-app qpg6105+debug FLASH 653084 653100 16 0.0
RAM 104680 104680 0 0.0
lock-app qpg6105+debug FLASH 612288 612304 16 0.0
RAM 99320 99320 0 0.0
stm32 light STM32WB5MM-DK FLASH 475456 475480 24 0.0
RAM 144300 144300 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 633182 633206 24 0.0
RAM 50576 50576 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 660244 660270 26 0.0
RAM 148520 148520 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 780470 780496 26 0.0
RAM 113300 113300 0 0.0
bridge-app tlsr9258a FLASH 677462 677488 26 0.0
RAM 95384 95384 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 634766 634790 24 0.0
RAM 50620 50620 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 720638 720662 24 0.0
RAM 77196 77196 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615524 615550 26 0.0
RAM 144724 144724 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 803328 803354 26 0.0
RAM 103128 103128 0 0.0
lock-app-dfu tlsr9528a FLASH 666594 666618 24 0.0
RAM 69900 69900 0 0.0
ota-requestor-app tlsr9258a FLASH 695498 695522 24 0.0
RAM 95068 95068 0 0.0
pump-app tlsr9518adk80d FLASH 618410 618436 26 0.0
RAM 57040 57040 0 0.0
pump-controller-app tlsr9518adk80d FLASH 607440 607464 24 0.0
RAM 56800 56800 0 0.0
shell tlsr9518adk80d FLASH 466520 466520 0 0.0
RAM 72488 72488 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 641384 641408 24 0.0
RAM 52248 52248 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 651262 651286 24 0.0
RAM 60436 60436 0 0.0
thermostat tlsr9518adk80d FLASH 626148 626172 24 0.0
RAM 57124 57124 0 0.0
window-covering tlsr9118bdk40d FLASH 519532 519556 24 0.0
RAM 97856 97856 0 0.0
tizen all-clusters-app arm unknown 1588 1588 0 0.0
FLASH 1645992 1646008 16 0.0
RAM 48908 48908 0 0.0
chip-tool-ubsan arm unknown 2388 2388 0 0.0
FLASH 16291606 16291622 16 0.0
RAM 7153512 7153512 0 0.0

@mergify mergify bot merged commit 77824ed into project-chip:master Jul 30, 2024
69 checks passed
@bzbarsky-apple bzbarsky-apple deleted the add-forced-reporting branch July 30, 2024 15:57
j-ororke pushed a commit to j-ororke/connectedhomeip that referenced this pull request Jul 31, 2024
…roject-chip#34521)

When using a QuieterReportingAttribute to track whether reporting is needed, we
can end up in a situation where we set a value that we have not reported yet,
and then an edge happens that requires reporting to be triggered, without the
relevant value changing.  In that situation the QuieterReportingAttribute
remembers the last-reported value (not just the last-set one), and will return
AttributeDirtyState::kMustReport.

What was missing was a way to tell the ember data store "go ahead and report
this, even though we are not in fact changing the value".  We want that, in this
case, since the ember data store just knows the last-set value, not the
last-reported one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants