)]}'
{"gnocchi/ceilometer/dispatcher.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"276c6436ef31ee8c0fa1010994310aa759bf7539","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def __init__(self, conf):"},{"line_number":94,"context_line":"        super(GnocchiDispatcher, self).__init__(conf)"},{"line_number":95,"context_line":"        self.gnocchi_url \u003d conf.dispatcher_gnocchi.url"},{"line_number":96,"context_line":"        self.storage \u003d opentsdb.OpenTSDBStorage(cfg.CONF)"},{"line_number":97,"context_line":"        self.indexer \u003d indexer.get_driver(cfg.CONF)"},{"line_number":98,"context_line":"        self.gnocchi_archive_policy \u003d None"},{"line_number":99,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_a5e7a2e3","line":96,"updated":"2014-10-30 14:27:40.000000000","message":"Why is the storage object being directly instantiated here as OpenTSDB, instead of being loaded in the usual way under the control of the cfg.CONF.storage.driver option? e.g.\n\n  self.storage \u003d gnocchi.storage.get_driver(cfg.CONF)","commit_id":"68f17b73f8892c643b7f9ddfb226780679c02dfe"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"1414f57c43b316ddfc30031796d19e385b1f21c7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    def __init__(self, conf):"},{"line_number":94,"context_line":"        super(GnocchiDispatcher, self).__init__(conf)"},{"line_number":95,"context_line":"        self.gnocchi_url \u003d conf.dispatcher_gnocchi.url"},{"line_number":96,"context_line":"        self.storage \u003d opentsdb.OpenTSDBStorage(cfg.CONF)"},{"line_number":97,"context_line":"        self.indexer \u003d indexer.get_driver(cfg.CONF)"},{"line_number":98,"context_line":"        self.gnocchi_archive_policy \u003d None"},{"line_number":99,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_a5d162cf","line":96,"in_reply_to":"7a8c0949_a5e7a2e3","updated":"2014-10-30 15:10:19.000000000","message":"Eoghan, you are right. I will fix it in next patch set.","commit_id":"68f17b73f8892c643b7f9ddfb226780679c02dfe"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"ce5aa094592f1591c6ad7cc5866650daf60b9ad7","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        super(GnocchiDispatcher, self).__init__(conf)"},{"line_number":98,"context_line":"        print \"CONFIG\""},{"line_number":99,"context_line":"        self.gnocchi_url \u003d conf.dispatcher_gnocchi.url"},{"line_number":100,"context_line":"        self.storage \u003d storage.get_driver(conf)"},{"line_number":101,"context_line":"        self.indexer \u003d indexer.get_driver(conf)"},{"line_number":102,"context_line":"        self.archive_policy \u003d None"},{"line_number":103,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8c0949_6430f1e8","line":100,"updated":"2014-11-07 12:45:40.000000000","message":"Ilya, how did you solve the problem with threading context issue we\u0027ve faced while usage this dispatcher inside of ceilometer?","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"4fd102cd7da43903fb434c923d811bdd412f8c33","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        super(GnocchiDispatcher, self).__init__(conf)"},{"line_number":98,"context_line":"        print \"CONFIG\""},{"line_number":99,"context_line":"        self.gnocchi_url \u003d conf.dispatcher_gnocchi.url"},{"line_number":100,"context_line":"        self.storage \u003d storage.get_driver(conf)"},{"line_number":101,"context_line":"        self.indexer \u003d indexer.get_driver(conf)"},{"line_number":102,"context_line":"        self.archive_policy \u003d None"},{"line_number":103,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8c0949_84d15d59","line":100,"in_reply_to":"7a8c0949_6430f1e8","updated":"2014-11-07 12:50:52.000000000","message":"Now this issue is kept, but in single dispatcher instance, without ceilometer, this initializing is more correct.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.mgmr \u003d stevedore.dispatch.DispatchExtensionManager("},{"line_number":104,"context_line":"            \u0027gnocchi.ceilometer.resource\u0027, lambda x: True,"},{"line_number":105,"context_line":"            invoke_on_load\u003dTrue)"},{"line_number":106,"context_line":"        self.entity_cache \u003d {}"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def record_metering_data(self, data):"},{"line_number":109,"context_line":"        # FIXME(sileht): This method bulk the processing of samples"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_03ed6b8b","line":106,"updated":"2014-11-13 15:51:11.000000000","message":"This is a in-memory cache that is no suitable if we start multiple collectors.\nAnd also the size of this cache is directly linked to the number of resources.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            if not entity_id:"},{"line_number":148,"context_line":"                raise NoSuchEntity"},{"line_number":149,"context_line":"            self._post_measure(entity_id, measure_attributes)"},{"line_number":150,"context_line":"        except NoSuchEntity:"},{"line_number":151,"context_line":"            # NOTE(sileht): we try first to create the resource, because"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_366467e4","line":148,"updated":"2014-11-13 15:51:11.000000000","message":"This is not really true if we run multiple collectors, the entity can exists but the entity_cache can be obsolete. But anyway the exception code block seems tring to update the cache of this resource in this case.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            if entity_name not in self.entity_cache[resource_id]:"},{"line_number":166,"context_line":"                self._create_entity(resource_id, entity_name,"},{"line_number":167,"context_line":"                                    resource_attributes[\u0027user_id\u0027],"},{"line_number":168,"context_line":"                                    resource_attributes[\u0027project_id\u0027])"},{"line_number":169,"context_line":"                resource_need_to_be_updated \u003d True"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"            # NOTE(sileht): we retry to post the measure but if it fail we"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_96643b23","line":168,"updated":"2014-11-13 15:51:11.000000000","message":"This can raise \u0027EntityAlreadyExists\u0027 even the entity_name is not in the cache.\nIn case of we run multiple collectors.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        if resource_need_to_be_updated:"},{"line_number":178,"context_line":"            resource_attributes \u003d self._get_resource_attributes("},{"line_number":179,"context_line":"                ext, resource_id, samples, for_update\u003dTrue)"},{"line_number":180,"context_line":"            resource_attributes[\u0027entities\u0027] \u003d self.entity_cache.get(resource_id)"},{"line_number":181,"context_line":"            self._update_resource(resource_type, resource_id,"},{"line_number":182,"context_line":"                                  resource_attributes)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_96199b8a","line":180,"updated":"2014-11-13 15:51:11.000000000","message":"This override the whole entities list, how can we be sure that the cache is up to date (ie: perhaps an other collector have already updated the entities list in the meantime)","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                self.indexer.create_resource(resource_type, resource_id,"},{"line_number":212,"context_line":"                                             **resource_attributes)"},{"line_number":213,"context_line":"        except indexer.ResourceAlreadyExists:"},{"line_number":214,"context_line":"            raise ResourceAlreadyExists"},{"line_number":215,"context_line":"        except Exception:"},{"line_number":216,"context_line":"            raise UnexpectedWorkflowError("},{"line_number":217,"context_line":"                \"Resource %(resource_id)s creation failed with\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_16e84be1","line":214,"updated":"2014-11-13 15:51:11.000000000","message":"I think we can directly use the gnocchi exception here.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            raise"},{"line_number":229,"context_line":"            # raise NoSuchResource"},{"line_number":230,"context_line":"        except indexer.UnknownResourceType:"},{"line_number":231,"context_line":"            raise NoSuchResource"},{"line_number":232,"context_line":"        except Exception as e:"},{"line_number":233,"context_line":"            raise"},{"line_number":234,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_76ed0fef","line":231,"updated":"2014-11-13 15:51:11.000000000","message":"I think we can directly use the gnocchi exception here.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"804bb30020ad96b16f4da1dbd89f0f418db95657","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                self.storage.create_entity("},{"line_number":256,"context_line":"                    id, self.archive_policy[\u0027definition\u0027])"},{"line_number":257,"context_line":"        except storage.EntityAlreadyExists:"},{"line_number":258,"context_line":"            raise EntityAlreadyExists"},{"line_number":259,"context_line":"        except Exception as e:"},{"line_number":260,"context_line":"            raise"},{"line_number":261,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_96bb5be4","line":258,"updated":"2014-11-13 15:51:11.000000000","message":"I think we can directly use the gnocchi exception here.","commit_id":"d4e3a11e3aa8c0e870fe71c3a9c9efb455e23e05"}]}
