Fetching of resource effective values takes a lot of time

Bug #1626147 reported by Alexander Kislitsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Kislitsky

Bug Description

Steps to reproduce:

1. generate json data sets with number of keys over than 10000 and save to files 'data0.json', 'data1.json', 'data2.json',
2. create component:
   fuel2 config comp create -n comp1
3. create resource:
   fuel2 config def create -n res1 -p '{}' -t json -i COMP_ID
4. create environment:
   fuel2 config env create -i COMPONENT_ID -l level1,level2
5. create resource values on the root level:
   cat data0.json | fuel2 config set -e ENV_ID -r RES_ID -f json
6. create resource values on the level1:
   for i in {1..500}; do cat data1.json | fuel2 config set -e ENV_ID -r RES_ID -l level1=$i -f json; done
7. create resource values on the level2:
   for i in {1..500}; do cat data1.json | fuel2 config set -e ENV_ID -r RES_ID -l level1=$i,level2=$i -f json; done
8. check the effective resource value:
   fuel2 config get -e ENV_ID -r RES_ID
   fuel2 config get -e ENV_ID -r RES_ID -l level1=1
   fuel2 config get -e ENV_ID -r RES_ID -l level1=1,level2=1

Expected result:
  Time of get operations are the same.

Actual result:
  Time of get operations are increased when levels added.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tuning-box (master)

Fix proposed to branch: master
Review: https://review.openstack.org/374228

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tuning-box (master)

Reviewed: https://review.openstack.org/374228
Committed: https://git.openstack.org/cgit/openstack/tuning-box/commit/?id=3705aa1526e5969e742df3b1286e78241da7a435
Submitter: Jenkins
Branch: master

commit 3705aa1526e5969e742df3b1286e78241da7a435
Author: Alexander Kislitsky <email address hidden>
Date: Wed Sep 21 17:17:33 2016 +0300

    Fetching effective resource values optimized

    Now only required resource values are fetched on calculating
    effective values.
    Calculation of effective values optimised to use indexed resource
    values insead of going throw nested for loop.
    Test for fetching values and effective values for 500 items
    (nodes) added. Each resource value contains over than 10000 keys.
    Logging added to the resource values fetching.

    Change-Id: Icea7ece8a2bc6957bcb00c9d90d8cf59e5ca1da0
    Closes-Bug: #1626147

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Alexey. Kalashnikov (akalashnikov) wrote :

verified on 9.2

shotgun2 report:
http://paste.openstack.org/show/586692/

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.