SetDirty
called more than CHIP_IM_SERVER_MAX_NUM_DIRTY_SET
times will result in data being lost...
#16273
Labels
SetDirty
called more than CHIP_IM_SERVER_MAX_NUM_DIRTY_SET
times will result in data being lost...
#16273
Problem
If we call
SetDirty
more thanCHIP_IM_SERVER_MAX_NUM_DIRTY_SET
times synchronously in a given execution context, the remaining calls will fail without any real recovery strategy. This will result in those items not being marked dirty and failing to be delivered to clients, resulting in clients seeing a different view of data than what is on the server.Proposed Solution
The crappiest answer here is to tear down all subscriptions since we can no longer guarantee coherency. We really should endeavor to do better than this.
Possible alternatives include some kind of coalescing/compaction of the dirty list that progressively lowers the precision of the path set to just free up a single slot:
The algorithm above should exit the moment it manages to free up a single slot.
The text was updated successfully, but these errors were encountered: