CPS-887 Decreasing performance of cmHandle registration after large number of schema sets in DB

CPS-887 Decreasing performance of cmHandle registration after large number of schema sets in DB

https://lf-onap.atlassian.net/browse/CPS-887

References:

Proposed solutions

Description

Notes

Description

Notes

1

Change yang_resource table in dataspace to include dataspace_id 

  • requires liquibase changes 

  • most expensive option

2

List all module references irrespective of the dataspace



3

Change current algorithm and move the check to database level

  • does not depend on the number of yang resources in database but on number of nodes a cmHandle has

  • scales better

Solution 3

Investigation

Storing bookstore model on 2 different dataspaces

On start up of the application through CSIT setup the yang_resource table on the database has the followig resource

id

name

content

checksum

module_name

revision

id

name

content

checksum

module_name

revision

24

stores

.....

.....

stores

2020-09-15

Then the following steps were taken:

Description

Results

Notes

Description

Results

Notes

1

Created two dataspaces

  • my-dataspace-1

  • my-dataspace-2





2

Created two schemasets

  • my-schema-set-1

  • my-schema-set-2

For both schema-sets the 'bookstore.yang' model was used 

  • Each created schema-set has their own id on the database table 'schema_set_yang_resources'

  • Both schema-sets has the same yang_resource_id

  • 'bookstore.yang' stored in yang_resource table with its file name

After creating two schema-sets using the same model, the yang_resource table contains the following

id

name

content

checksum

module_name

revision

24**

stores

....

....

stores

2020-09-15

33

bookstore.yang

....

....

stores

2020-09-15

** id 24 was preloaded and has a different 'name'

Conclusion: Based on the test above, dataspace id is not needed anymore.