Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1446

Locked cmhandles and ready to locked state transitions causing long cmHandle discovery

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • London Release
    • London Release
    • NCMP
    • None

      Current behavior
      With latest CPS master (86cda427e084b45c0f76d67f0eeebe74ee419ff2) we faced an issue during cmhandle registration.
      Previously registration (reaching ADVISED to READY state) took around 8 minutes for 100 cmhandles
      Now we register 100 cmHandles and it can not finish in our test timeout (20 minutes), it takes at least 30 minutes or longer.
      How I see it is because strange state transitions and long time periods where no state transitions happening. Under strange state transitions I mean that some READY cmhandles going to LOCKED
      There are search issues too during the tests. From the time when the first LOCKED states appearing we got 500 errors both on ncmp/v1/ch/id-searches and cps/api/v1/dataspaces/NFP-Operational/anchors searches:

      {     "status": "500 INTERNAL_SERVER_ERROR",     "message": "Unable to find org.onap.cps.spi.entities.SchemaSetEntity with id 647",     "details": "Check logs for details." }

         

       

      Expected behavior:
      Successful ADVISED-READY state transitions for high amount of cmHandles, without hanging procedure and without unexpected state transitions, with same performance as before.
      No SchemaSetEntity not found errors during the search requests.

       

      Reproduction

      • Use a near real model adapter which simulates some kind of processing/latency too to have bit longer response times.
      • Register high amount of cmHandles. We registered only 100, but for reproduction it is better to have more, to have longer discovery procedure
      • Check the database content in each minute and not the cmHandle states. There will be some cmHandles whose state will change from READY to LOCKED.
      • After the first cmHandle with LOCKED state appears try to perform ncmp/v1/ch/id-searches and cps/api/v1/dataspaces/NFP-Operational/anchors search requests too, to see the SchemaSetEntity not found errors.
         

      Tested CPS commits

       

      Test environment:

      • Real cluster
      • No mocks in the system
      • Postgres database
      • Real model adapter, same version for every test
      • Every test performed after clean installation

       

      Collected logs:

      ncmp-full.log
      cmhandle_states_during_reproduction.txt

        1. cmhandle_states_during_reproduction.txt
          3 kB
        2. disco-ttl600-10k.log
          15 kB
        3. ncmp-cps1446-120s-debug-0120.log
          1.61 MB
        4. ncmp-cps1446-120s-master-0120.log
          1.19 MB
        5. ncmp-cps1446-150s-locked1m.log
          2.82 MB
        6. ncmp-cps1446-ttl600-lockedsleep1m.log
          231 kB
        7. ncmp-cps1446-ttl600-lockedsleep1m-2.log
          279 kB
        8. ncmp-cps1446-ttl600-lockedsleep1m-3.log
          224 kB
        9. ncmp-cps1446-ttl600-lockedsleep1m-4.log
          222 kB
        10. ncmp-cps1446-ttl600-lockedsleep5m.log
          176 kB
        11. ncmp-cps1446-ttl600-lockedsleep5m-2.log
          198 kB
        12. ncmp-cps1446-ttl600-lockedsleep5m-3.log
          193 kB
        13. ncmp-cps1446-ttlreverted.log
          139 kB
        14. ncmp-cps1446-ttlsecs120.log
          132 kB
        15. ncmp-cps1446-ttlsecs60.log
          3.26 MB
        16. ncmp-full.log
          1.62 MB
        17. ncmp-ttl600-10k.log
          6.61 MB

            mpriyank Priyank Maheshwari
            csaba.eder csaba Eder
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: