Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No notifications for entity deletion #1535

Open
pdmangel2 opened this issue Jan 16, 2024 · 12 comments
Open

No notifications for entity deletion #1535

pdmangel2 opened this issue Jan 16, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@pdmangel2
Copy link

Referring to #1307 and release notes :
I'm using orion-ld 1.3.0 and I'm not getting notification when entities are deleted.

@kzangeli
Copy link
Collaborator

You are probably not running the broker in the "new" mode.
The option to turn that on is called "-experimental" and I need to change that name.
It was experimental, more than a year ago.

@pdmangel2
Copy link
Author

even with -experimental I don't get them

the subscription for notifications (in mongodb)

{
    "_id" : "gspt:subscr:parktrack-api:entityCache:f82ac802-9d41-4e4a-b2bb-e73bf1d9e8c6",
    "description" : "parktrack-api entityCache  parkingzone updates",
    "entities" : [
        {
            "type" : "https://uri.etsi.org/ngsi-ld/default-context/ParkingGroup",
            "id" : ".*",
            "isPattern" : "true",
            "isTypePattern" : false
        }
    ],
    "ldQ" : "https://uri=etsi=org/ngsi-ld/default-context/gsApplicationType.value==%22ParkingZone%22",
    "createdAt" : 1705414833.2422335,
    "modifiedAt" : 1705414833.2422335,
    "throttling" : NumberInt(0),
    "expression" : {
        "geometry" : "",
        "coords" : "",
        "georel" : "",
        "geoproperty" : "",
        "q" : "https://uri=etsi=org/ngsi-ld/default-context/gsApplicationType.value==%22ParkingZone%22",
        "mq" : ""
    },
    "reference" : "http://nginx:8080/api/parktrack/entityCache/ngsiLDEntityUpdates",
    "mimeType" : "application/json",
    "attrs" : [

    ],
    "format" : "normalized",
    "conditions" : [

    ],
    "status" : "active",
    "custom" : false,
    "servicePath" : "/#",
    "blacklist" : false,
    "ldContext" : "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
}

@kzangeli
Copy link
Collaborator

ok, that is weird.
Pretty sure I implemented that ...
In a meeting right now. Will look at this asap

@kzangeli
Copy link
Collaborator

ok, I just understood what's failing here.
I have a functest making sure the notifications for DELETE arrive.

BUT, that functest is not very complete.
For example, it doesn't include a subscription with a "q".
And that's the bug. I just tested it, modifying my functest (adding a "q" to one of the subscriptions).
It fails, because apparently I include the "q" as a filter also for DELETE operations when I match entity modifications with subscriptions. That's obviously a mistake, and the culprit to the bug you've found.

Should be an easy fix. Stay tuned ... :)

@kzangeli kzangeli self-assigned this Jan 17, 2024
@kzangeli kzangeli added the bug Something isn't working label Jan 17, 2024
kzangeli added a commit that referenced this issue Jan 18, 2024
kzangeli added a commit that referenced this issue Jan 18, 2024
@kzangeli
Copy link
Collaborator

PR merged.
Please try with the new docker image and close this issue if it's working as it should.

@pdmangel2
Copy link
Author

Thanks for the quick update Ken.
I'm getting an update message ... but twice. Can you confirm this ?

@kzangeli
Copy link
Collaborator

You get two notifications of the Deletion?
That would only (hopefully) happen if you have two subscriptions ...

@pdmangel2
Copy link
Author

I checked and I have a single subscription.
Also updates are coming only once.

@kzangeli
Copy link
Collaborator

Ah ok, all good then :)

@pdmangel2
Copy link
Author

Sorry ... creation and updates are coming once, deletions twice :-(

@kzangeli
Copy link
Collaborator

Hmm, ok, I'll have to look into that, see if I can reproduce it.
Just that subscription from above and you delete a matching entity, right?

@pdmangel2
Copy link
Author

indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants