openweave / openweave-core

openWeave is a home area network application protocol stack designed to enable asynchronous, symmetric, device-to-device, device-to-mobile and device-to-cloud communications for control path and data path messaging.
Apache License 2.0
233 stars 105 forks source link

Do not set trait instance to dirty after loading persisted subscription #661

Closed didishe90 closed 3 years ago

didishe90 commented 3 years ago

If subscription is not persisted, publisher sends trait data to client after client sends trait version list to publisher during subscription. If subscription is persisted, we load trait instance from persisted data. Currently, we set all trait instance to dirty when we load the trait instances. This would sometimes result in sending empty traits to client. This PR stops marking trait instance as dirty during loading subscription.

codecov-commenter commented 3 years ago

Codecov Report

Merging #661 (90dbc3b) into master (9f9d245) will increase coverage by 0.00%. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #661   +/-   ##
=======================================
  Coverage   70.09%   70.09%           
=======================================
  Files         484      484           
  Lines       87454    87454           
=======================================
+ Hits        61302    61304    +2     
+ Misses      26152    26150    -2     
Impacted Files Coverage Δ
...es/data-management/Current/SubscriptionHandler.cpp 83.30% <ø> (ø)
src/lib/core/WeaveConnectionTunnel.cpp 81.01% <0.00%> (-1.27%) :arrow_down:
src/inet/TCPEndPoint.cpp 51.20% <0.00%> (+0.11%) :arrow_up:
src/lib/profiles/security/WeaveCert.cpp 88.96% <0.00%> (+0.45%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9f9d245...90dbc3b. Read the comment docs.