-
Bug
-
Resolution: Done
-
Medium
-
London Release
-
None
Summary
After registering cmHandles through /ncmpInventory/v1/ch API and monitoring the cps.data-updated-events topic, the generated event is getting larger by each new cmHandle. After several thousand cmHandles, this causes org.apache.kafka.common.errors.RecordTooLargeException to be thrown and event publishing fails. Side effect is that CPS starts to consume CPU constantly and service performance degrades for subsequent cmHandle registrations.
The number of cmHandles after which the issue occurs depends on when the message size hits the limit of the producer's message.max.bytes configuration (1MB by default).
Event after first cm handle registration:
{ "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v1", "id": "5693582e-9f31-49b0-9ecf-c966fe23d216", "source": "urn:cps:org.onap.cps", "type": "org.onap.cps.data-updated-event", "content": { "observedTimestamp": "2022-11-02T12:44:30.595+0000", "dataspaceName": "NCMP-Admin", "schemaSetName": "ncmp-dmi-registry-model", "anchorName": "ncmp-dmi-registry", "operation": "UPDATE", "data": { "dmi-registry:dmi-registry": { "cm-handles": [ { "id": "B615E09903D6AFBD08AFEF6F869329F8", "dmi-service-name": "", "dmi-data-service-name": "http://some-data-service-name:8080", "dmi-model-service-name": "http://some-model-service-name:8080", "additional-properties": [ { "name": "someKey", "value": "someValue" } ], "state": { "cm-handle-state": "READY", "last-update-time": "2022-11-02T12:44:30.593+0000", "data-sync-enabled": false, "datastores": { "operational": { "sync-state": "NONE_REQUESTED" } } } } ] } } } }
Event after second cm handle:
{ "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v1", "id": "55bcae1d-91cf-4864-bc81-5d3fc2fa3b8d", "source": "urn:cps:org.onap.cps", "type": "org.onap.cps.data-updated-event", "content": { "observedTimestamp": "2022-11-02T12:53:19.591+0000", "dataspaceName": "NCMP-Admin", "schemaSetName": "ncmp-dmi-registry-model", "anchorName": "ncmp-dmi-registry", "operation": "UPDATE", "data": { "dmi-registry:dmi-registry": { "cm-handles": [ { "id": "B615E09903D6AFBD08AFEF6F869329F8", "dmi-service-name": "", "dmi-data-service-name": "http://some-data-service-name:8080", "dmi-model-service-name": "http://some-model-service-name:8080", "additional-properties": [ { "name": "someKey", "value": "someValue" } ], "state": { "cm-handle-state": "READY", "last-update-time": "2022-11-02T12:44:30.593+0000", "data-sync-enabled": false, "datastores": { "operational": { "sync-state": "NONE_REQUESTED" } } } }, { "id": "452E73D23BF444023784946E09525192", "dmi-service-name": "", "dmi-data-service-name": "http://some-data-service-name:8080", "dmi-model-service-name": "http://some-model-service-name:8080", "additional-properties": [ { "name": "someKey", "value": "someValue" } ], "state": { "cm-handle-state": "READY", "last-update-time": "2022-11-02T12:53:19.590+0000", "data-sync-enabled": false, "datastores": { "operational": { "sync-state": "NONE_REQUESTED" } } } } ] } } } }
Note that the event for the second cmHandle contains the first one as well, which has been already published.
This makes the event larger and larger and becomes significant in size after several thousand cmHandles.
Reproduction steps
1. Register single cmHandle through POST request on /ncmpInventory/v1/ch API.
2. Consume event from kafka topic "cps.data-updated-events"
(for example:
execute /usr/bin/kafka-console-consumer --topic cps.data-updated-events --bootstrap-server localhost:9092 --from-beginning on the kafka container)
3. Register another cmHandle
4. Consume event from kafka and observe event contains previous CmHandle as well.
- mentioned in
-
Page Loading...