)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6763,"name":"jingliuqing","email":"jing.liuqing@99cloud.net","username":"jing"},"change_message_id":"ed5fd999909a22c413e0eb982586fceb898913ff","unresolved":false,"context_lines":[{"line_number":54,"context_line":"file near you, soon) this shouldn\u0027t be a problem. If it is then we"},{"line_number":55,"context_line":"can come up with a way to create a hash that can deal with"},{"line_number":56,"context_line":"sub-dicts."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Change-Id: I1f2da145ca87712cd2ff5b8afecf1bca0ba53788"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da85f559_bae2fed3","line":57,"updated":"2015-11-09 15:33:29.000000000","message":"Closes-Bug: #1483634","commit_id":"ddc5f2b4401e40a9908581b7f987388daa32fe12"}],"ReleaseNotes":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"3552e9eb117c992fd6cfd50a6e0db406d9ccae4b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Release notes are maintained in rst format in "},{"line_number":2,"context_line":"  doc/source/releasenotes/"},{"line_number":3,"context_line":"they can be read online at "},{"line_number":4,"context_line":"  http://docs.openstack.org/developer/ceilometer/releasenotes/index.html"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"ba8a016a_42351ef5","side":"PARENT","line":1,"updated":"2015-11-17 11:59:47.000000000","message":"big unrelated change","commit_id":"d753c5de26ab4ebc678d9b7f17d45e396207c65c"}],"ceilometer/dispatcher/gnocchi.py":[{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"581d3343697c2d733d68e84c6c0da67263971a21","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            if self.cache:"},{"line_number":292,"context_line":"                cache_key \u003d resource_id + \u0027:update\u0027"},{"line_number":293,"context_line":"                resource_info \u003d copy.deepcopy(resource_extra)"},{"line_number":294,"context_line":"                with self._gnocchi_project_id_lock:"},{"line_number":295,"context_line":"                    attribute_hash \u003d hash(frozenset(resource_info.items()))"},{"line_number":296,"context_line":"                    cached_hash \u003d self.cache.get(cache_key)"},{"line_number":297,"context_line":"                    if cached_hash !\u003d attribute_hash:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_f6d05821","line":294,"updated":"2015-11-06 01:03:07.000000000","message":"the lock acquiring can probably move to after line 297.","commit_id":"b4850edd51e702e4ba63d1125bc4d6138b2cbcb1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0734a6371c607acaa3b8881abf19eae83f7eb59a","unresolved":false,"context_lines":[{"line_number":291,"context_line":"            if self.cache:"},{"line_number":292,"context_line":"                cache_key \u003d resource_id + \u0027:update\u0027"},{"line_number":293,"context_line":"                resource_info \u003d copy.deepcopy(resource_extra)"},{"line_number":294,"context_line":"                with self._gnocchi_project_id_lock:"},{"line_number":295,"context_line":"                    attribute_hash \u003d hash(frozenset(resource_info.items()))"},{"line_number":296,"context_line":"                    cached_hash \u003d self.cache.get(cache_key)"},{"line_number":297,"context_line":"                    if cached_hash !\u003d attribute_hash:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_13ee40b4","line":294,"in_reply_to":"fa80f949_f6d05821","updated":"2015-11-06 09:44:37.000000000","message":"Yeah, that\u0027s the plan.","commit_id":"b4850edd51e702e4ba63d1125bc4d6138b2cbcb1"},{"author":{"_account_id":13560,"name":"Rohit Jaiswal","email":"rohit.jaiswal@gmail.com","username":"rjaiswal"},"change_message_id":"581d3343697c2d733d68e84c6c0da67263971a21","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                cache_key \u003d resource[\u0027id\u0027] + \u0027:create\u0027"},{"line_number":316,"context_line":"                resource_info \u003d copy.deepcopy(resource)"},{"line_number":317,"context_line":"                del resource_info[\u0027metrics\u0027]"},{"line_number":318,"context_line":"                with self._gnocchi_project_id_lock:"},{"line_number":319,"context_line":"                    attribute_hash \u003d hash(frozenset(resource_info.items()))"},{"line_number":320,"context_line":"                    cached_hash \u003d self.cache.get(cache_key)"},{"line_number":321,"context_line":"                    if cached_hash !\u003d attribute_hash:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_d6c3d455","line":318,"updated":"2015-11-06 01:03:07.000000000","message":"ditto.","commit_id":"b4850edd51e702e4ba63d1125bc4d6138b2cbcb1"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"c7962c79531bdc4467038cc820cd398fcc578950","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                                              resource_extra)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _check_resource_cache(self, resource_id, resource_data, action):"},{"line_number":321,"context_line":"        cache_key \u003d resource_id + action"},{"line_number":322,"context_line":"        resource_info \u003d copy.deepcopy(resource_data)"},{"line_number":323,"context_line":"        if \u0027metrics\u0027 in resource_info:"},{"line_number":324,"context_line":"            del resource_info[\u0027metrics\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_07a8931e","line":321,"updated":"2015-11-09 15:29:02.000000000","message":"what\u0027s action for? i don\u0027t really understand why we differentiate cache of update or create.","commit_id":"ddc5f2b4401e40a9908581b7f987388daa32fe12"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"6c988a1dbf12a561fa7479a7e3343f6c1f808d9c","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                                              resource_extra)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _check_resource_cache(self, resource_id, resource_data, action):"},{"line_number":321,"context_line":"        cache_key \u003d resource_id + action"},{"line_number":322,"context_line":"        resource_info \u003d copy.deepcopy(resource_data)"},{"line_number":323,"context_line":"        if \u0027metrics\u0027 in resource_info:"},{"line_number":324,"context_line":"            del resource_info[\u0027metrics\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_0ef98880","line":321,"in_reply_to":"da85f559_07a8931e","updated":"2015-11-09 16:27:08.000000000","message":"Though the data in the cache might be the same between the calls to create_resource and update_resource because it is two different methods being called (in python and over http (one is POST, PATCH)) it struck me as wise to use, effectively, two different caches for each call to preserve the division between the calls.\n\nThe semantics of the two calls are different (most notably where the \u0027id\u0027 is in the transaction) so we don\u0027t want to muddy the waters.\n\nOr do we?","commit_id":"ddc5f2b4401e40a9908581b7f987388daa32fe12"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"9c10e1679d06bb90da68530bde4fb3b831442918","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                self.cache \u003d oslo_cache.configure_cache_region("},{"line_number":158,"context_line":"                    self.conf, cache_region)"},{"line_number":159,"context_line":"                self.cache.key_mangler \u003d cache_key_mangler"},{"line_number":160,"context_line":"        except oslo_cache.exception.ConfigurationError as exc:"},{"line_number":161,"context_line":"            LOG.warn(_LW(\u0027unable to configure oslo_cache: %s\u0027) % exc)"},{"line_number":162,"context_line":"        except ImportError:"},{"line_number":163,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_34005f34","line":160,"updated":"2015-11-17 09:05:22.000000000","message":"This will raise a NameError if oslo_cache cannot be imported.\n\nImportError must be catched first.","commit_id":"77f746e17d9d4dcc50954cfb00fcd0473c2116d7"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0dbc7329900ba6050e664f7ae8d927d30e85da4a","unresolved":false,"context_lines":[{"line_number":287,"context_line":"            except gnocchi_client.NoSuchMetric:"},{"line_number":288,"context_line":"                # TODO(sileht): Make gnocchi smarter to be able to detect 404"},{"line_number":289,"context_line":"                # for \u0027resource doesn\u0027t exist\u0027 and for \u0027metric doesn\u0027t exist\u0027"},{"line_number":290,"context_line":"                # https://bugs.launchpad.net/gnocchi/+bug/1476186"},{"line_number":291,"context_line":"                self._ensure_resource_and_metric(resource_type, resource,"},{"line_number":292,"context_line":"                                                 metric_name)"},{"line_number":293,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_1e321111","line":290,"updated":"2015-11-09 19:29:08.000000000","message":"i think we should drop the action param and have a single instance of each resource because i think right now we\u0027re still making unneeded calls.\n\nfor instance, here if we create the resource (in _ensure_resource_and_metric) we will make a call to gnocchi api but...","commit_id":"77f746e17d9d4dcc50954cfb00fcd0473c2116d7"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0dbc7329900ba6050e664f7ae8d927d30e85da4a","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        if resource_extra:"},{"line_number":304,"context_line":"            if self.cache:"},{"line_number":305,"context_line":"                cache_key, attribute_hash \u003d self._check_resource_cache("},{"line_number":306,"context_line":"                    resource[\u0027id\u0027], resource, \u0027update\u0027)"},{"line_number":307,"context_line":"                if attribute_hash:"},{"line_number":308,"context_line":"                    with self._gnocchi_resource_lock:"},{"line_number":309,"context_line":"                        self._gnocchi.update_resource(resource_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_7e023d0d","line":306,"updated":"2015-11-09 19:29:08.000000000","message":"... in the same call, we will update something that we just created because the cache only exists for \u0027create\u0027 and not \u0027update\u0027.","commit_id":"77f746e17d9d4dcc50954cfb00fcd0473c2116d7"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0dbc7329900ba6050e664f7ae8d927d30e85da4a","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        try:"},{"line_number":334,"context_line":"            if self.cache:"},{"line_number":335,"context_line":"                cache_key, attribute_hash \u003d self._check_resource_cache("},{"line_number":336,"context_line":"                    resource[\u0027id\u0027], resource, \u0027create\u0027)"},{"line_number":337,"context_line":"                if attribute_hash:"},{"line_number":338,"context_line":"                    with self._gnocchi_resource_lock:"},{"line_number":339,"context_line":"                        self._gnocchi.create_resource(resource_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"da85f559_523bad9c","line":336,"updated":"2015-11-09 19:29:08.000000000","message":"similarly, if we need to create a new metric but not resource, we (may) run another API call to create something that may already exist but matched only to update version","commit_id":"77f746e17d9d4dcc50954cfb00fcd0473c2116d7"}]}
