FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
51 stars 43 forks source link

subCacheAlterationMatch Warning #1559

Open FR-ADDIX opened 9 months ago

FR-ADDIX commented 9 months ago

We have the following warning:

WARN@11:35:00 subCacheAlterationMatch.cpp[153]: Unterschiedliche Entität (urn:ngsi-ld:TrafficObservationBicycleData:Kiel:C4:VDZ2 vs urn:ngsi-ld:TrafficObservationBicycleData:Kiel:C4:VDZ1) - muss zur Benachrichtigung für sub urn:ngsi-ld hinzugefügt werden:
subscription:1444c2ca-1f01-11ee-89e0-b25ea0b7e8d5 

What does this mean and how can I fix it?

The subscription is this one:

{
    "id": "urn:ngsi-ld:subscription:1444c2ca-1f01-11ee-89e0-b25ea0b7e8d5",
    "type": "Abonnement",
    "subscriptionName": "NR:TrafficObservationBicycleData",
    "description": "Benachrichtigung ein neues TrafficObservationBicycleData entsteht",
    "entities": [
        {
            "idPattern": "TrafficObservationBicycleData",
            "type": "TrafficObservationBicycleData" (VerkehrsbeobachtungFahrraddaten)
        }
    ],
    "watchedAttributes": [
        "dateObserved"
    ],
    "status": "active",
    "isActive": wahr,
    "notification": {
        "format": "normalisiert",
        "Endpunkt": {
            "uri": "http://nrld20.fiware.svc/fromcb",
            "accept": "application/json",
            "receiverInfo": [
                {
                    "key": "Fiware-Dienst",
                    "value": "infoportal"
                }
            ]
        },
        "status": "ok",
        "timesSent": 4653,
        "lastNotification": "2024-02-15T11:38:01.451Z",
        "lastFailure": "2023-12-15T07:38:00.262Z",
        "lastSuccess": "2024-02-15T11:38:01.451Z"
    },
    "origin": "cache",
    "jsonldContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
}

Approx. 120 entities are renewed, which then trigger this warning.

kzangeli commented 9 months ago

Are you processing the broker logfile, translating it to German? :) Perhaps giving me the original text next time. Took me a while :)

It seems like it's a piece of "not implemented yet". Now, instead of looking at the log file, is something not working well? For this case, look for some entity missing in the "data" array of entities in a notification. Traces can be old and misleading sometimes.

FR-ADDIX commented 9 months ago

Oops, I hadn't realized that I had translated the log. :)

No, it only seems to affect the log, but it makes it very difficult to read. the function is apparently not restricted.

kzangeli commented 9 months ago

So, two things.

  1. Is it easy to reproduce the problem? (if so, I'd like to know how to and I can make sure all is OK)
  2. Do you get many instances of this warning?

If it's a false positive, I'll remove the warning. I'd just like to fully understand it before I do that.

FR-ADDIX commented 9 months ago

ok, the way I see it, it's just a warning but it doesn't seem to have any effect on the subscription itself. there are different high traffic models. Vehicle, for example, delivers 60 to 90 updates per second. And the FLIR Cam "TrafficObservationIntegratedData" delivers about 70 fresh entities once a minute. This is where the warning is particularly noticeable.

All subscriptions that contain many simultaneously changed entities have these warnings.

Here is the example for the FLIR Cam Subscrib Subscribtion:

{
    "id": "urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714",
    "type": "Subscription",
    "subscriptionName": "QL:TrafficObservationIntegratedData",
    "description": "Historisierung der TrafficObservationIntegratedData Daten",
    "entities": [
        {
            "idPattern": "TrafficObservationIntegratedData",
            "type": "TrafficObservationIntegratedData"
        }
    ],
    "watchedAttributes": [
        "dateObserved"
    ],
    "status": "active",
    "isActive": true,
    "notification": {
        "format": "normalized",
        "endpoint": {
            "uri": "http://quantumleap8.fiware-staging.svc:8668/v2/notify",
            "accept": "application/json",
            "receiverInfo": [
                {
                    "key": "Fiware-Service",
                    "value": "infoportal"
                }
            ]
        },
        "status": "ok",
        "timesSent": 100,
        "lastNotification": "2024-02-16T12:53:30.563Z",
        "lastSuccess": "2024-02-16T12:53:30.563Z"
    },
    "origin": "cache",
    "jsonldContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
}
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ2:5) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ2:4) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ2:3) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ2:2) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ2:1) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:8) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:7) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:6) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:5) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:4) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:3) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714                                                                   
WARN@12:50:14  subCacheAlterationMatch.cpp[153]: Different entity (urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ11.2:VDZ2:8 vs urn:ngsi-ld:TrafficObservationIntegratedData:Kiel:CZ
11.2:VDZ1:2) - need to add it to the notification for sub urn:ngsi-ld:subscription:3186e0f2-56bf-11ee-9bef-6e8429ed8714 
kzangeli commented 9 months ago

I'll have a look at it. With some luck it's a warning that shouldn't be there. I'd just like to make sure that it's true and then remove the warning. For that I need to be able to reproduce it. Busy today but I'll have a look at this next week.