)]}'
{"gnocchi/cli.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0eb14584bf3622d935a30e309d01653ffc6477be","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def _configure(self):"},{"line_number":182,"context_line":"        super(MetricScheduler, self)._configure()"},{"line_number":183,"context_line":"        try:"},{"line_number":184,"context_line":"            join_req \u003d self._coord.join_group(self.GROUP_ID)"},{"line_number":185,"context_line":"            join_req.get()"},{"line_number":186,"context_line":"            LOG.info(\u0027Joined coordination group: %s\u0027, self.GROUP_ID)"},{"line_number":187,"context_line":"            self.set_sacks(None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_ba243dc5","line":184,"updated":"2017-03-09 12:34:38.000000000","message":"instead you should use join_partitioned_group and you\u0027ll get your hashring for free here :)","commit_id":"5e9fe719f03cedabb28264381ca2aaf706c00d87"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0eb14584bf3622d935a30e309d01653ffc6477be","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            t.daemon \u003d True"},{"line_number":197,"context_line":"            t.start()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"            self._coord.watch_join_group(self.GROUP_ID, self.set_sacks)"},{"line_number":200,"context_line":"            self._coord.watch_leave_group(self.GROUP_ID, self.set_sacks)"},{"line_number":201,"context_line":"        except coordination.GroupNotCreated as e:"},{"line_number":202,"context_line":"            create_group_req \u003d self._coord.create_group(self.GROUP_ID)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a30ddce_da2d71a9","line":199,"updated":"2017-03-09 12:34:38.000000000","message":"and this will go away","commit_id":"5e9fe719f03cedabb28264381ca2aaf706c00d87"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4536072fcfc523bfbd5cd023c0d323a4fdf479e0","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            members \u003d sorted(get_members_req.get())"},{"line_number":165,"context_line":"            index \u003d members.index(self._my_id)"},{"line_number":166,"context_line":"            # TODO(gordc): change to hashring"},{"line_number":167,"context_line":"            self.sack_list \u003d ("},{"line_number":168,"context_line":"                [i for i in six.moves.range(NUM_SACKS)][index::len(members)])"},{"line_number":169,"context_line":"            if not self.sack_list:"},{"line_number":170,"context_line":"                raise Exception"},{"line_number":171,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_2f90c994","line":168,"range":{"start_line":167,"start_character":29,"end_line":168,"end_character":17},"updated":"2017-03-22 13:43:33.000000000","message":"use [\u003cRET\u003e\nno need for those ()","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4536072fcfc523bfbd5cd023c0d323a4fdf479e0","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            # TODO(gordc): change to hashring"},{"line_number":167,"context_line":"            self.sack_list \u003d ("},{"line_number":168,"context_line":"                [i for i in six.moves.range(NUM_SACKS)][index::len(members)])"},{"line_number":169,"context_line":"            if not self.sack_list:"},{"line_number":170,"context_line":"                raise Exception"},{"line_number":171,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"},{"line_number":172,"context_line":"                     len(self.sack_list))"},{"line_number":173,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_8f88dd72","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":31},"updated":"2017-03-22 13:43:33.000000000","message":"gni","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"61177c90176506d1cda75d18270b11d47291681d","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            # TODO(gordc): change to hashring"},{"line_number":167,"context_line":"            self.sack_list \u003d ("},{"line_number":168,"context_line":"                [i for i in six.moves.range(NUM_SACKS)][index::len(members)])"},{"line_number":169,"context_line":"            if not self.sack_list:"},{"line_number":170,"context_line":"                raise Exception"},{"line_number":171,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"},{"line_number":172,"context_line":"                     len(self.sack_list))"},{"line_number":173,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_a764ddb8","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":31},"in_reply_to":"1a1ced50_507cc2b4","updated":"2017-03-22 14:59:07.000000000","message":"it\u0027s an onomatopoeia\n\nit\u0027s when my eyebrows frown","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b8840455a37cc9e09fe19c6e79ea192ea26d0c1b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            # TODO(gordc): change to hashring"},{"line_number":167,"context_line":"            self.sack_list \u003d ("},{"line_number":168,"context_line":"                [i for i in six.moves.range(NUM_SACKS)][index::len(members)])"},{"line_number":169,"context_line":"            if not self.sack_list:"},{"line_number":170,"context_line":"                raise Exception"},{"line_number":171,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"},{"line_number":172,"context_line":"                     len(self.sack_list))"},{"line_number":173,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_507cc2b4","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":31},"in_reply_to":"1a1ced50_8f88dd72","updated":"2017-03-22 14:31:56.000000000","message":"what does this mean? \"gross national income\"? \"girls night in\"?","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"98f87b437ebc1f3d6e8050a046489aa5967e78e2","unresolved":false,"context_lines":[{"line_number":166,"context_line":"            # TODO(gordc): change to hashring"},{"line_number":167,"context_line":"            self.sack_list \u003d ("},{"line_number":168,"context_line":"                [i for i in six.moves.range(NUM_SACKS)][index::len(members)])"},{"line_number":169,"context_line":"            if not self.sack_list:"},{"line_number":170,"context_line":"                raise Exception"},{"line_number":171,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"},{"line_number":172,"context_line":"                     len(self.sack_list))"},{"line_number":173,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_877c41ed","line":170,"range":{"start_line":169,"start_character":12,"end_line":170,"end_character":31},"in_reply_to":"1a1ced50_a764ddb8","updated":"2017-03-22 15:05:02.000000000","message":"what does onomatopoeia mean? joke... i\u0027ll google.\n\ni think this was from when i had configurable buckets","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"4536072fcfc523bfbd5cd023c0d323a4fdf479e0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                     len(self.sack_list))"},{"line_number":173,"context_line":"        except Exception:"},{"line_number":174,"context_line":"            LOG.warning(\u0027Error getting sacks to work on, defaulting to all\u0027)"},{"line_number":175,"context_line":"            self.sack_list \u003d [i for i in six.moves.range(NUM_SACKS)]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    @utils.retry"},{"line_number":178,"context_line":"    def _configure(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a1ced50_8feffd1c","line":175,"range":{"start_line":175,"start_character":29,"end_line":175,"end_character":68},"updated":"2017-03-22 13:43:33.000000000","message":"list(six.moves.range(NUM_SACKS))\n\nplzzzz","commit_id":"24b576e538a3505a17e817a905fc15ccd6c9d19e"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"e4bd15890670e13a6a93309c0dc29e5297d78ec5","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            LOG.info(\u0027New set of agents detected. Now working on %s sacks\u0027,"},{"line_number":170,"context_line":"                     len(self.sack_list))"},{"line_number":171,"context_line":"        except Exception:"},{"line_number":172,"context_line":"            LOG.warning(\u0027Error getting sacks to work on, defaulting to all\u0027)"},{"line_number":173,"context_line":"            self.sack_list \u003d list(six.moves.range(NUM_SACKS))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @utils.retry"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a1ced50_5395a230","line":172,"updated":"2017-03-22 17:39:52.000000000","message":"For debugging purpose it\u0027ll be better to have info as why but I see this was already the case before so","commit_id":"d5ae8a6f20ec0ed09f72a4e792d9a2b33788b12f"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"030e11a984daad624f6d7a89e9547a34eee8cdb5","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            self._tasks \u003d ["},{"line_number":187,"context_line":"                (i,) for i in six.moves.range(self.store.incoming.NUM_SACKS)"},{"line_number":188,"context_line":"                if self.partitioner.belongs_to_self("},{"line_number":189,"context_line":"                    hashlib.md5(str(i)).digest())]"},{"line_number":190,"context_line":"        return self._tasks"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _run_job(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"dfeb2761_cc3fd3d4","line":189,"updated":"2017-03-31 15:05:50.000000000","message":"is this just a test? don\u0027t see the value","commit_id":"230d5719c7b89cbf8f9e5c2ebb022153cd017bf0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"2dad1e6a9663a68ab0403965aedd7cdd966c88b9","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            self._tasks \u003d ["},{"line_number":187,"context_line":"                (i,) for i in six.moves.range(self.store.incoming.NUM_SACKS)"},{"line_number":188,"context_line":"                if self.partitioner.belongs_to_self("},{"line_number":189,"context_line":"                    hashlib.md5(str(i)).digest())]"},{"line_number":190,"context_line":"        return self._tasks"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _run_job(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"dfeb2761_9adc5875","line":189,"in_reply_to":"dfeb2761_cc3fd3d4","updated":"2017-03-31 18:09:36.000000000","message":"yeah, i was testing whether it was the buckets not being hashed properly... this didn\u0027t help.","commit_id":"230d5719c7b89cbf8f9e5c2ebb022153cd017bf0"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd5dad4b9c200681804bbbeb0eb1fcf896594007","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            m_count \u003d 0"},{"line_number":157,"context_line":"            s_count \u003d 0"},{"line_number":158,"context_line":"            in_ \u003d self.store.incoming"},{"line_number":159,"context_line":"            for s in six.moves.range(in_.NUM_SACKS):"},{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_c0368cb5","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":15},"updated":"2017-04-14 14:41:44.000000000","message":"inc?","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8d57959765cb5791429fd0e0611008aef2210bf7","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            m_count \u003d 0"},{"line_number":157,"context_line":"            s_count \u003d 0"},{"line_number":158,"context_line":"            in_ \u003d self.store.incoming"},{"line_number":159,"context_line":"            for s in six.moves.range(in_.NUM_SACKS):"},{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_05eeb821","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":15},"in_reply_to":"7ffa3b31_85abe8d4","updated":"2017-04-15 16:06:26.000000000","message":"sorry, i was suggesting to use inc as a name rather in_, which looks more readable. or even incoming :)","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"302eb7887131b6e763722a7085ad6cf1bb7d49e6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        try:"},{"line_number":156,"context_line":"            m_count \u003d 0"},{"line_number":157,"context_line":"            s_count \u003d 0"},{"line_number":158,"context_line":"            in_ \u003d self.store.incoming"},{"line_number":159,"context_line":"            for s in six.moves.range(in_.NUM_SACKS):"},{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_85abe8d4","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":15},"in_reply_to":"7ffa3b31_c0368cb5","updated":"2017-04-15 15:53:28.000000000","message":"what\u0027s inc?","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd5dad4b9c200681804bbbeb0eb1fcf896594007","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"},{"line_number":162,"context_line":"                try:"},{"line_number":163,"context_line":"                    with self._lock(s)(blocking\u003dFalse):"},{"line_number":164,"context_line":"                        metrics \u003d in_.list_metric_with_measures_to_process(s)"},{"line_number":165,"context_line":"                        sack_size \u003d len(metrics)"},{"line_number":166,"context_line":"                        self.store.process_background_tasks(self.index,"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_e05068d7","line":163,"updated":"2017-04-14 14:41:44.000000000","message":"This sounds like there\u0027s going to be a lot of contention, i.e. process trying to grab the same locks over and over again? Aren\u0027t we scared of that?","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8d57959765cb5791429fd0e0611008aef2210bf7","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"},{"line_number":162,"context_line":"                try:"},{"line_number":163,"context_line":"                    with self._lock(s)(blocking\u003dFalse):"},{"line_number":164,"context_line":"                        metrics \u003d in_.list_metric_with_measures_to_process(s)"},{"line_number":165,"context_line":"                        sack_size \u003d len(metrics)"},{"line_number":166,"context_line":"                        self.store.process_background_tasks(self.index,"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_e5f2ac06","line":163,"in_reply_to":"7ffa3b31_05891874","updated":"2017-04-15 16:06:26.000000000","message":"so on 100 metricd with 4096 sacks this is going to hammer the coordination server pretty heavily no?","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"302eb7887131b6e763722a7085ad6cf1bb7d49e6","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"},{"line_number":162,"context_line":"                try:"},{"line_number":163,"context_line":"                    with self._lock(s)(blocking\u003dFalse):"},{"line_number":164,"context_line":"                        metrics \u003d in_.list_metric_with_measures_to_process(s)"},{"line_number":165,"context_line":"                        sack_size \u003d len(metrics)"},{"line_number":166,"context_line":"                        self.store.process_background_tasks(self.index,"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_05891874","line":163,"in_reply_to":"7ffa3b31_e05068d7","updated":"2017-04-15 15:53:28.000000000","message":"basically, the process works as if it\u0027s the only process alive. it has no idea what else exists. it just checks to see if a sack can be processed or not and moves on.\n\nwhen i test this on my 4 nodes, it seems fine, it runs through 512 sacks pretty quickly.","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"fef867b72068f72418a509436297a0cb9b344e38","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                # TODO(gordc): make tooz support delay release lock so we don\u0027t"},{"line_number":161,"context_line":"                # process a sack right after it\u0027s another process"},{"line_number":162,"context_line":"                try:"},{"line_number":163,"context_line":"                    with self._lock(s)(blocking\u003dFalse):"},{"line_number":164,"context_line":"                        metrics \u003d in_.list_metric_with_measures_to_process(s)"},{"line_number":165,"context_line":"                        sack_size \u003d len(metrics)"},{"line_number":166,"context_line":"                        self.store.process_background_tasks(self.index,"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_bc24bdc7","line":163,"in_reply_to":"7ffa3b31_e5f2ac06","updated":"2017-04-16 13:46:27.000000000","message":"i can test this. i have 54 metricd and 512 sacks and i don\u0027t really notice anything. in theory, i\u0027d imagine it\u0027s not adding signficantly more lock requests compared to current scenario. with 4096 sacks, we\u0027d probably have a \u003e 1 million metrics and we already make a lock request per metric.","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        self._coord, self._my_id \u003d utils.get_coordinator_and_start("},{"line_number":147,"context_line":"            conf.storage.coordination_url)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def _lock(self, sack):"},{"line_number":150,"context_line":"        lock_name \u003d b\u0027gnocchi-sack-%s-lock\u0027 % str(sack).encode(\u0027ascii\u0027)"},{"line_number":151,"context_line":"        return self._coord.get_lock(lock_name)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_6c114a5d","line":149,"updated":"2017-04-21 08:05:38.000000000","message":"nit: rename to _lock_sack","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                    continue"},{"line_number":164,"context_line":"                try:"},{"line_number":165,"context_line":"                    metrics \u003d in_store.list_metric_with_measures_to_process(s)"},{"line_number":166,"context_line":"                    sack_size \u003d len(metrics)"},{"line_number":167,"context_line":"                    self.store.process_background_tasks(self.index, metrics)"},{"line_number":168,"context_line":"                    m_count +\u003d sack_size"},{"line_number":169,"context_line":"                    s_count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_06050211","line":166,"updated":"2017-04-21 08:05:38.000000000","message":"m_count +\u003d len(metrics)\n\ndoes not seem like sack_size is used","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                    lock.release()"},{"line_number":175,"context_line":"            LOG.debug(\"%d metrics processed from %d sacks\", m_count, s_count)"},{"line_number":176,"context_line":"        except Exception:"},{"line_number":177,"context_line":"            LOG.error(\"Unexpected error obtaining lock\", exc_info\u003dTrue)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def close_services(self):"},{"line_number":180,"context_line":"        self._coord.stop()"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_c6239aa6","line":177,"updated":"2017-04-21 08:05:38.000000000","message":"you can\u0027t log an error saying that you failed to obtain a lock whereas you catch \"Exception\". And since the try/except is so wide and just logging the exception, I don\u0027t think it\u0027s even worth it. Cotyledon will raise the backtrace itself if something unexpected happen.\n\neither catch finer grained exception type _if_ it\u0027s worth it, or just let the exception be raised to higher levels","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"}],"gnocchi/storage/incoming/_carbonara.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cefa85be4b5ff4981f204c8982047b4b59ecbb55","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def process_measure_for_metric(metric):"},{"line_number":79,"context_line":"        raise NotImplementedError"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def compute_sack(self, metric_id):"},{"line_number":82,"context_line":"        return metric_id.int % self.NUM_SACKS"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_c69a7a60","line":81,"updated":"2017-04-21 08:17:18.000000000","message":"not fan of \"compute\" verb here","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3aca51831ceb5fe03c27d768cd3c9f79ed099a89","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def process_measure_for_metric(metric):"},{"line_number":79,"context_line":"        raise NotImplementedError"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def compute_sack(self, metric_id):"},{"line_number":82,"context_line":"        return metric_id.int % self.NUM_SACKS"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_b0e43d0e","line":81,"in_reply_to":"7ffa3b31_ad3986d7","updated":"2017-04-21 13:24:12.000000000","message":"sack_for_metric() or metric_to_sack() sounds better and more in line with the code style we developed ;)","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"159c3d18973be974d317e4f92f949b6e40438758","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def process_measure_for_metric(metric):"},{"line_number":79,"context_line":"        raise NotImplementedError"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def compute_sack(self, metric_id):"},{"line_number":82,"context_line":"        return metric_id.int % self.NUM_SACKS"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_a38635b8","line":81,"in_reply_to":"7ffa3b31_b0e43d0e","updated":"2017-04-21 14:13:26.000000000","message":"our method names are too damn long :P","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"74febe65766a4378d04c95c8b5ddc2e835efbfe9","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def process_measure_for_metric(metric):"},{"line_number":79,"context_line":"        raise NotImplementedError"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def compute_sack(self, metric_id):"},{"line_number":82,"context_line":"        return metric_id.int % self.NUM_SACKS"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_ad3986d7","line":81,"in_reply_to":"7ffa3b31_c69a7a60","updated":"2017-04-21 12:47:48.000000000","message":"map2sack better?","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"}],"gnocchi/storage/incoming/s3.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"cd5dad4b9c200681804bbbeb0eb1fcf896594007","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return (len(metric_details), sum(metric_details.values()),"},{"line_number":80,"context_line":"                metric_details if details else None)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_metric_with_measures_to_process(self, sack):"},{"line_number":83,"context_line":"        limit \u003d 1000        # 1000 is the default anyway"},{"line_number":84,"context_line":"        metrics \u003d set()"},{"line_number":85,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_800e44e3","line":82,"updated":"2017-04-14 14:41:44.000000000","message":"i\u0027m curious… so it\u0027ll return everything for any sack requested, meaning you\u0027ll have basically multiple workers locking sack 1, 2, 3, 4 but actually working on the same data. hm ok","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"302eb7887131b6e763722a7085ad6cf1bb7d49e6","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return (len(metric_details), sum(metric_details.values()),"},{"line_number":80,"context_line":"                metric_details if details else None)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_metric_with_measures_to_process(self, sack):"},{"line_number":83,"context_line":"        limit \u003d 1000        # 1000 is the default anyway"},{"line_number":84,"context_line":"        metrics \u003d set()"},{"line_number":85,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_e57d0c6f","line":82,"in_reply_to":"7ffa3b31_800e44e3","updated":"2017-04-15 15:53:28.000000000","message":"nope. a single worker will lock a sack until it processes it completely... more accurately, it processes all the metrics list_metric_with_measures_to_process tells it initially. since a metric will only ever be in one sack, it will never be handled by more than one process","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"8825f1c326060e5a617819de7c0c60c67647e183","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return (len(metric_details), sum(metric_details.values()),"},{"line_number":80,"context_line":"                metric_details if details else None)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_metric_with_measures_to_process(self, sack):"},{"line_number":83,"context_line":"        limit \u003d 1000        # 1000 is the default anyway"},{"line_number":84,"context_line":"        metrics \u003d set()"},{"line_number":85,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_aa769d05","line":82,"in_reply_to":"7ffa3b31_c5f7b0f5","updated":"2017-04-17 13:57:37.000000000","message":"right, in reality, this is happening starting from first patch[1], not this patch.\n\n[1] https://review.openstack.org/#/c/452905/","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"8d57959765cb5791429fd0e0611008aef2210bf7","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return (len(metric_details), sum(metric_details.values()),"},{"line_number":80,"context_line":"                metric_details if details else None)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_metric_with_measures_to_process(self, sack):"},{"line_number":83,"context_line":"        limit \u003d 1000        # 1000 is the default anyway"},{"line_number":84,"context_line":"        metrics \u003d set()"},{"line_number":85,"context_line":"        response \u003d {}"}],"source_content_type":"text/x-python","patch_set":42,"id":"7ffa3b31_c5f7b0f5","line":82,"in_reply_to":"7ffa3b31_e57d0c6f","updated":"2017-04-15 16:06:26.000000000","message":"I get that but that\u0027s not the reality (yet) in this patch, right? :)\n\nsince list_metric_with_measures_to_process(1) is going to return the same thing that l_m_w_m_t_p(2) or (3) or (4)… here","commit_id":"912ba8204283e0dccb973d80dfe34d6a15747531"}],"gnocchi/tests/base.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        super(TestCase, self).tearDown()"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @staticmethod"},{"line_number":330,"context_line":"    def list_all_metrics(incoming):"},{"line_number":331,"context_line":"        return set.union(*[incoming.list_metric_with_measures_to_process(i)"},{"line_number":332,"context_line":"                           for i in six.moves.range(incoming.NUM_SACKS)])"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_46442a47","line":330,"updated":"2017-04-21 08:05:38.000000000","message":"this seems to be a bit misnamed, maybe something like list_all_metrics_with_measures_in_incoming ;)","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3aca51831ceb5fe03c27d768cd3c9f79ed099a89","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        super(TestCase, self).tearDown()"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @staticmethod"},{"line_number":330,"context_line":"    def list_all_metrics(incoming):"},{"line_number":331,"context_line":"        return set.union(*[incoming.list_metric_with_measures_to_process(i)"},{"line_number":332,"context_line":"                           for i in six.moves.range(incoming.NUM_SACKS)])"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_90ef01e8","line":330,"in_reply_to":"7ffa3b31_0d7d1a6d","updated":"2017-04-21 13:24:12.000000000","message":"yeah, one of those sounds good :)","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"74febe65766a4378d04c95c8b5ddc2e835efbfe9","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        super(TestCase, self).tearDown()"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @staticmethod"},{"line_number":330,"context_line":"    def list_all_metrics(incoming):"},{"line_number":331,"context_line":"        return set.union(*[incoming.list_metric_with_measures_to_process(i)"},{"line_number":332,"context_line":"                           for i in six.moves.range(incoming.NUM_SACKS)])"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_0d7d1a6d","line":330,"in_reply_to":"7ffa3b31_46442a47","updated":"2017-04-21 12:47:48.000000000","message":"... that seems long as hell.lol\n\nlist_all_incoming_metrics? list_all_metrics_in_incoming?","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"}],"gnocchi/tests/functional/fixtures.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def run(self):"},{"line_number":175,"context_line":"        incoming \u003d self.storage.incoming"},{"line_number":176,"context_line":"        while self.flag:"},{"line_number":177,"context_line":"            metrics \u003d set.union("},{"line_number":178,"context_line":"                *[incoming.list_metric_with_measures_to_process(i)"},{"line_number":179,"context_line":"                  for i in six.moves.range(incoming.NUM_SACKS)])"},{"line_number":180,"context_line":"            self.storage.process_background_tasks(self.index, metrics)"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_8667d2e9","line":177,"updated":"2017-04-21 08:05:38.000000000","message":"is this the same thing u defined in base.py just before? list_all_metrics()?","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"74febe65766a4378d04c95c8b5ddc2e835efbfe9","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def run(self):"},{"line_number":175,"context_line":"        incoming \u003d self.storage.incoming"},{"line_number":176,"context_line":"        while self.flag:"},{"line_number":177,"context_line":"            metrics \u003d set.union("},{"line_number":178,"context_line":"                *[incoming.list_metric_with_measures_to_process(i)"},{"line_number":179,"context_line":"                  for i in six.moves.range(incoming.NUM_SACKS)])"},{"line_number":180,"context_line":"            self.storage.process_background_tasks(self.index, metrics)"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_adc3c688","line":177,"in_reply_to":"7ffa3b31_8667d2e9","updated":"2017-04-21 12:47:48.000000000","message":"yes.","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"}],"gnocchi/tests/test_rest.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"69f140d0c03c9b181a826635222405b5c917d5fb","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            req.headers[\u0027X-User-Id\u0027] \u003d self.USER_ID"},{"line_number":123,"context_line":"            req.headers[\u0027X-Project-Id\u0027] \u003d self.PROJECT_ID"},{"line_number":124,"context_line":"        response \u003d super(TestingApp, self).do_request(req, *args, **kwargs)"},{"line_number":125,"context_line":"        metrics \u003d set.union("},{"line_number":126,"context_line":"            *[self.storage.incoming.list_metric_with_measures_to_process(i)"},{"line_number":127,"context_line":"              for i in six.moves.range(self.storage.incoming.NUM_SACKS)])"},{"line_number":128,"context_line":"        self.storage.process_background_tasks(self.indexer, metrics, sync\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_666286da","line":125,"updated":"2017-04-21 08:05:38.000000000","message":"ditto?","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"74febe65766a4378d04c95c8b5ddc2e835efbfe9","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            req.headers[\u0027X-User-Id\u0027] \u003d self.USER_ID"},{"line_number":123,"context_line":"            req.headers[\u0027X-Project-Id\u0027] \u003d self.PROJECT_ID"},{"line_number":124,"context_line":"        response \u003d super(TestingApp, self).do_request(req, *args, **kwargs)"},{"line_number":125,"context_line":"        metrics \u003d set.union("},{"line_number":126,"context_line":"            *[self.storage.incoming.list_metric_with_measures_to_process(i)"},{"line_number":127,"context_line":"              for i in six.moves.range(self.storage.incoming.NUM_SACKS)])"},{"line_number":128,"context_line":"        self.storage.process_background_tasks(self.indexer, metrics, sync\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":44,"id":"7ffa3b31_cd4df23e","line":125,"in_reply_to":"7ffa3b31_666286da","updated":"2017-04-21 12:47:48.000000000","message":"yes","commit_id":"88b94d9a786eca17d87f99b9290f798015b38d74"}]}
