config: improve performance by not reading backref/children from db if not needed

Bug #1421752 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
Undecided
Hampapur Ajay

Bug Description

in cassandra_<type>_read() implementation of autogen code, all the columns of an object are read from DB and filtered by field_names by iteration.

In scale situations this is non-performant as project, ipam, sg etc. have many backrefs and most common case is to not need backref/children of these objects.

So fix autogen code to check required fields against the set of backref + children and read-in with column_start if not only props/ref are needed.

Hampapur Ajay (hajay)
Changed in juniperopenstack:
assignee: nobody → Hampapur Ajay (hajay)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/7438
Committed: http://github.org/Juniper/contrail-generateDS/commit/d1c215fd9cab5a74edd698f41ce1bc361bc2eb7a
Submitter: Zuul
Branch: R2.0

commit d1c215fd9cab5a74edd698f41ce1bc361bc2eb7a
Author: Hampapur Ajay <email address hidden>
Date: Fri Feb 13 10:10:33 2015 -0800

config: do not read backref/children fields from cassandra if not needed

from the bug descr:
in cassandra_<type>_read() implementation of autogen code, all the columns
of an object are read from DB and filtered by field_names by iteration.

In scale situations this is non-performant as project, ipam, sg etc. have
many backrefs and most common case is to not need backref/children of these objects.

So fix autogen code to check required fields against the set of backref + children
and read-in with column_start if not only props/ref are needed.

Change-Id: Ie96744e829f67409c6cb76deecb4e7117ac61d5d
Closes-Bug: #1421752
(cherry picked from commit acc3904c3c0b56e9871d885c24ad5404814e4e8a)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/7433
Committed: http://github.org/Juniper/contrail-generateDS/commit/38d7f19de3fb5ecde332f37a0d4fd6ea0d971e31
Submitter: Zuul
Branch: R2.1

commit 38d7f19de3fb5ecde332f37a0d4fd6ea0d971e31
Author: Hampapur Ajay <email address hidden>
Date: Fri Feb 13 10:10:33 2015 -0800

config: do not read backref/children fields from cassandra if not needed

from the bug descr:
in cassandra_<type>_read() implementation of autogen code, all the columns
of an object are read from DB and filtered by field_names by iteration.

In scale situations this is non-performant as project, ipam, sg etc. have
many backrefs and most common case is to not need backref/children of these objects.

So fix autogen code to check required fields against the set of backref + children
and read-in with column_start if not only props/ref are needed.

Change-Id: Ie96744e829f67409c6cb76deecb4e7117ac61d5d
Closes-Bug: #1421752
(cherry picked from commit 5c674d0bd5b3575bf4dd3a42b5c1fa469cb226bb)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/7799
Committed: http://github.org/Juniper/contrail-generateDS/commit/13ab69f5fc17de340cddbcaa8f3ac1734cdd2b82
Submitter: Zuul
Branch: R1.10

commit 13ab69f5fc17de340cddbcaa8f3ac1734cdd2b82
Author: Hampapur Ajay <email address hidden>
Date: Fri Feb 13 10:10:33 2015 -0800

config: do not read backref/children fields from cassandra if not needed

from the bug descr:
in cassandra_<type>_read() implementation of autogen code, all the columns
of an object are read from DB and filtered by field_names by iteration.

In scale situations this is non-performant as project, ipam, sg etc. have
many backrefs and most common case is to not need backref/children of these objects.

So fix autogen code to check required fields against the set of backref + children
and read-in with column_start if not only props/ref are needed.

Change-Id: Ie96744e829f67409c6cb76deecb4e7117ac61d5d
Closes-Bug: #1421752
(cherry picked from commit acc3904c3c0b56e9871d885c24ad5404814e4e8a)
(cherry picked from commit d1c215fd9cab5a74edd698f41ce1bc361bc2eb7a)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/7421
Committed: http://github.org/Juniper/contrail-generateDS/commit/48550eff29ec91d3645ee678276dc712c340e7a3
Submitter: Zuul
Branch: master

commit 48550eff29ec91d3645ee678276dc712c340e7a3
Author: Hampapur Ajay <email address hidden>
Date: Fri Feb 13 10:10:33 2015 -0800

config: do not read backref/children fields from cassandra if not needed

from the bug descr:
in cassandra_<type>_read() implementation of autogen code, all the columns
of an object are read from DB and filtered by field_names by iteration.

In scale situations this is non-performant as project, ipam, sg etc. have
many backrefs and most common case is to not need backref/children of these objects.

So fix autogen code to check required fields against the set of backref + children
and read-in with column_start if not only props/ref are needed.

Change-Id: Ie96744e829f67409c6cb76deecb4e7117ac61d5d
Closes-Bug: #1421752

Changed in juniperopenstack:
status: New → Fix Committed
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.