Retrieving a published resource incorrectly gives 404 if its payload is not present in cache yet
kurattila opened this issue · 0 comments
kurattila commented
Description
Plgd/hub incorrectly indicates that a resource payload which is currently not in cache, will not ever be in cache, either.
How can it be reproduced?
- Register a device and wait for its registered event
- Wait for resources published event (but don't wait for any cache updated events)
- Try retrieving cached value of an already published resource => will return
404
, since payload is missing from cache - Client won't ever retry retrieving that same resource value, since 404 denotes it makes no sense to retry, in general
Environment
- plgd Docker containers tag:
2.4.2
Additional context
Returning 503
instead of 404
would make the client know that after some retries, the payload is going to be present.