-
Notifications
You must be signed in to change notification settings - Fork 2k
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 support for caching events to the AttributeCache
#17030
Add support for caching events to the AttributeCache
#17030
Conversation
…ing getting subsumed
2d7e3b3
to
0d2c325
Compare
0d2c325
to
2578bd8
Compare
PR #17030: Size comparison from 01aa957 to 2578bd8 Increases above 0.2%:
Increases (4 builds for linux)
Full report (31 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
PR #17030: Size comparison from c2a4218 to 5e76748 Increases above 0.2%:
Increases (3 builds for linux)
Decreases (2 builds for esp32)
Full report (31 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
8193785
to
c19caf3
Compare
PR #17030: Size comparison from 1581c6d to c19caf3 Increases (1 build for linux)
Full report (23 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
regarding mHighestReceivedEventNumber for your event cache PR, i think it is good to add one accessor to get mHighestReceivedEventNumber so that user could get this event number, and construct the event filter manually later if user don't wanna the cache, and user could retrieve the event data using the range from x to mHighestReceivedEventNumber |
Problem
This adds support for caching events to the
AttributeCache
, now re-named toClusterStateCache
to better describe its responsibilities that encompass both attributes and events.This is meant to unblock the event counterpart to #16602 so that re-subscriptions don't result in an avalanche of events.
The cache is backed by a
std::set
of astd::pair
consisting of anEventHeader
and the payload (encapsulated as aPacketBufferHandle
).Methods have been provided to iterate over the events in the cache in increasing order of event number.
Tests
A
TestEventCaching
test has been added that does an end-to-end test of a read involving events to validate the caching behavior.