iotedge-lorawan-starterkit icon indicating copy to clipboard operation
iotedge-lorawan-starterkit copied to clipboard

Ensure isolated twin refresh

Open p-schuler opened this issue 3 years ago • 0 comments

Twin refreshes happen in a background thread within the cache. There is no guarantee that the update is not happening while we are using a device. This could lead to partial update data being considered when processing a message.

  • [ ] #991
  • [ ] 1. Consider doing refreshes when requesting the device from the cache (async)
  • [ ] 2. Consider adding reference counting of active device instances - would need a single queue request processing #941

Number 2 has the disadvantage, that it will add the time for the refresh to the request processing time, that might result in missing the downstream window, but it is the most straightforward solution. If we see issues when doing #990 we should apply either depending on the time availability.

p-schuler avatar Dec 06 '21 07:12 p-schuler