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
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
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:
- ORIONLD_NOCACHE=FALSE
- ORIONLD_MULTI_SERVICE=FALSE
- ORIONLD_MONGO_DB=orionld
command: ["-dbhost", "mongo", "-logLevel", "DEBUG"]
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 :
The text was updated successfully, but these errors were encountered: