Open SystemsPurge opened 4 months ago
Seems like a bug in the subscription cache, not updating 'q' correctly. I'm on it. Just, on a business trip all next week. I'll do my best.
As a workaround, try PATCH http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Entity:test_entity03
instead of the one ending in /attrs
(the one you use replaces the attribute, it's really a PUT, not a PATCH, while the one I propose is a proper PATCH).
What CLI params do you use when starting Orion-LD ?
Nah, idiot proposal (removing /attrs from the URL path of the entity patch request), the bug is in t he PATCH of the subscription. I just tested both and the bug is (wrong q in sub-cache after subscription patch) there for noth versions of PATCH Entity. So, scratch that.
@kzangeli To answer the question about the CLI params , its a docker image ( in a compose file ) with the following env vars and command: environment:
Still working on this.
Found a solution though, long story, try adding the option -experimental
.
The entire DB layer has been reimplemented, using a newer mongo driver.
I tried it and it seems to be working.
Steps: Post an entity Post a subscription with a condition ( e.g q = temperature<30 ) Update the entity to correspond to the condition Update subscription to other condition (e.g q = temperature > 30 ) Update entity to correspond to new condition Update entity to correspond to old condition again
What happens: Notification is received on the first and third entity update but not the second one, despite the fact that on mongo express, the subscription is showing the correct expression
Here is the bash script i used to test it out :