You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollback() on data model builder should reset the error on the builder. (project-chip#26982)
* Rollback() on data model builder should reset the error on the builder.
Without this, it's too easy to forget to ResetError() when rolling back. That's
exactly what happened in ClusterStateCache:OnUpdateDataVersionFilterList, and
that could lead to inability to ever re-subscribe after a subscription drop.
We had the following Rollback() calls not immediately followed by ResetError():
* In SendFailureStatus in ember-compatibility-functions.cpp. This is never
reached when there is a failure on aAttributeReports, so doing the ResetError
here is not a problem.
* AttributeValueEncoder::EncodeListItem. This was relying on the
InteractionModelEngine to ResetError after the rollback.
* ClusterStateCache:OnUpdateDataVersionFilterList. When
CreateDataVersionFilter() failed, this could leave the
DataVersionFilterIBs::Builder in an error state, which would lead to the
subscribe request (incorrectly) failing completely.
* WriteHandler::ProcessAttributeDataIBs. This codepath was apparently not
getting hit in practice, since it would fail. It was also
checkpointing/restoring on the wrong builder.
* Engine::BuildSingleReportDataAttributeReportIBs. This was buggy: If we hit an
error other than "out of memory" while encoding the value, we could end up
with the builder in an error state and then fail to encode our status
response.
* ReadClient::SendReadRequest. This is never reached with an error on the
builder.
* ReadClient::SendSubscribeRequestImpl. This is never reached with an error on
the builder.
* Address review comment.
0 commit comments