This commit fixes an issue with deletes of list/map porperties.
The backend wasn't being updated when timestamps are used and one or
more key value pairs belonging to the same property are removed.
Note that for the issue occured if at least one key value pair remained
(with no timestamp change).
Added UT for list proerterites, map properties and a mix of list and
map proerties on the same object(vmi).
Notes on list map property processing:
Separate entries per list/map keys are stored in the ObjUuidCache
partition based on the uuid.
The cache map entries contain a refreshed bit and timestamp in addition
to the values etc.
A set containing list/map property names (updated_list_map_properties)
that have key/value pairs with a new timestamp, a second set
(candidate_list_map_properties) also containing list/map property names
that may require an update given some key/value pairs have been
deleted, and a multimap (list_map_properties) for all the list/map key
value pairs in the new configuration, are build and held in the
context(temporary).
These lists are used to determine which list/map properties need to be
pushed to the backend, they are built as columns are parsed. Once all
columns are parsed, in ListMapPropReviseUpdatelist, for each property
name in candidate_list_map_properties we check it is already in the
updated_list_map_property list, if not we proceed to find at least one
stale list/map key value pair with the property name in the
ObJUuidCache, if one is found that requires an update, the property
name is added to updated_list_map_properties.
Once updated_list_map_properties is revised, we iterate through each
property name in it and push all matching key/value pairs in
list_map_properties.
ConfigCass2JsonAdapter groups the key value pairs belonging to the same
property so that a single DB request is sent to the backend.
Deletes are handled by FormDeleteRequestList. Note that deletes are
sent only when all key/value pairs for a given list/map property are
removed.
Additionally, the resulting DB request only resets the property_set
bit, it does not clear the entries in the backend.
Reviewed: https:/ /review. opencontrail. org/33577 github. com/Juniper/ contrail- controller/ commit/ aaf429e1dc3cdaa 9c86cffb4fa5555 cbf9baccd4
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R4.0
commit aaf429e1dc3cdaa 9c86cffb4fa5555 cbf9baccd4
Author: Pramodh D'Souza <email address hidden>
Date: Mon Jul 10 22:56:13 2017 -0700
Fix issue with list/map property delete
This commit fixes an issue with deletes of list/map porperties. list_map_ properties) list_map_ properties) also containing list/map property names properties) for all the list/map key seUpdatelist, for each property list_map_ properties we check it is already in the list_map_ property list, if not we proceed to find at least one list_map_ properties. list_map_ properties is revised, we iterate through each properties. Adapter groups the key value pairs belonging to the same stList. Note that deletes are
The backend wasn't being updated when timestamps are used and one or
more key value pairs belonging to the same property are removed.
Note that for the issue occured if at least one key value pair remained
(with no timestamp change).
Added UT for list proerterites, map properties and a mix of list and
map proerties on the same object(vmi).
Notes on list map property processing:
Separate entries per list/map keys are stored in the ObjUuidCache
partition based on the uuid.
The cache map entries contain a refreshed bit and timestamp in addition
to the values etc.
A set containing list/map property names (updated_
that have key/value pairs with a new timestamp, a second set
(candidate_
that may require an update given some key/value pairs have been
deleted, and a multimap (list_map_
value pairs in the new configuration, are build and held in the
context(temporary).
These lists are used to determine which list/map properties need to be
pushed to the backend, they are built as columns are parsed. Once all
columns are parsed, in ListMapPropRevi
name in candidate_
updated_
stale list/map key value pair with the property name in the
ObJUuidCache, if one is found that requires an update, the property
name is added to updated_
Once updated_
property name in it and push all matching key/value pairs in
list_map_
ConfigCass2Json
property so that a single DB request is sent to the backend.
Deletes are handled by FormDeleteReque
sent only when all key/value pairs for a given list/map property are
removed.
Additionally, the resulting DB request only resets the property_set
bit, it does not clear the entries in the backend.
Change-Id: I13e626ea88cd61 fe97ea8c4b72b4a 2a1ec170ca5
Closes-Bug: #1700855