Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1361


Brief

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).

What is trying to be achieved:

unmigrated-wiki-markup
Code Block
titleCurrent Output
collapsetrue
{
  "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"
                }
              }
            }
          }
        ]
      }
    }
  }
} 


Code Block
titleDesired

...

unmigrated-wiki-markup
Output
collapsetrue
{
  "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"
                }
              }
            }
          }
        ]
      }
    }
  }
} 

...