)]}'
{"doc/source/install.rst":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":131,"context_line":"   This can takes several hours depending on the size of your index and"},{"line_number":132,"context_line":"   storage."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"3. Start thenew Gnocchi API server and metric daemon"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"Rolling upgrade"},{"line_number":137,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_47d15b22","line":134,"updated":"2015-12-07 22:11:32.000000000","message":"s/thenew/the new/","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":131,"context_line":"   This can takes several hours depending on the size of your index and"},{"line_number":132,"context_line":"   storage."},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"3. Start thenew Gnocchi API server and metric daemon"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"Rolling upgrade"},{"line_number":137,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_6649d95f","line":134,"in_reply_to":"7a740942_47d15b22","updated":"2015-12-08 10:46:42.000000000","message":"Done","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":136,"context_line":"Rolling upgrade"},{"line_number":137,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":138,"context_line":"Gnocchi supports online (rolling) upgrades, which avoids interrupting Gnocchi"},{"line_number":139,"context_line":"for a too long time. In order to upgrade from previous versions, you need to"},{"line_number":140,"context_line":"follow the folling steps:"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_a7aeff95","line":139,"updated":"2015-12-07 22:11:32.000000000","message":"s/a too/a/","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":136,"context_line":"Rolling upgrade"},{"line_number":137,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":138,"context_line":"Gnocchi supports online (rolling) upgrades, which avoids interrupting Gnocchi"},{"line_number":139,"context_line":"for a too long time. In order to upgrade from previous versions, you need to"},{"line_number":140,"context_line":"follow the folling steps:"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_267671a4","line":139,"in_reply_to":"7a740942_a7aeff95","updated":"2015-12-08 10:46:42.000000000","message":"Done","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":137,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":138,"context_line":"Gnocchi supports online (rolling) upgrades, which avoids interrupting Gnocchi"},{"line_number":139,"context_line":"for a too long time. In order to upgrade from previous versions, you need to"},{"line_number":140,"context_line":"follow the folling steps:"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_a7859f07","line":140,"updated":"2015-12-07 22:11:32.000000000","message":"s/folling/following/","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":139,"context_line":"for a too long time. In order to upgrade from previous versions, you need to"},{"line_number":140,"context_line":"follow the folling steps:"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"2. Run `gnocchi-upgrade --skip-storage` with the new version of Gnocchi."},{"line_number":145,"context_line":"   This can takes several minutes depending on the size of your index."}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_c706ab85","line":142,"updated":"2015-12-07 22:11:32.000000000","message":"i don\u0027t think this is exactly rolling if we have to take this down.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":139,"context_line":"for a too long time. In order to upgrade from previous versions, you need to"},{"line_number":140,"context_line":"follow the folling steps:"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"2. Run `gnocchi-upgrade --skip-storage` with the new version of Gnocchi."},{"line_number":145,"context_line":"   This can takes several minutes depending on the size of your index."}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_865de516","line":142,"in_reply_to":"7a740942_c706ab85","updated":"2015-12-08 10:46:42.000000000","message":"This is as much as rolling as we can. :)","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":150,"context_line":"   This can takes several hours depending on the size of your storage."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This will upgrade the indexer and storage in two passes. While a new version of"},{"line_number":153,"context_line":"Gnocchi cannot run with an old version of the indexer, it can runs with an old"},{"line_number":154,"context_line":"version of its storage back-end."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Running Gnocchi"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_a7ea7faa","line":153,"updated":"2015-12-07 22:11:32.000000000","message":"s/runs/run/","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":150,"context_line":"   This can takes several hours depending on the size of your storage."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"This will upgrade the indexer and storage in two passes. While a new version of"},{"line_number":153,"context_line":"Gnocchi cannot run with an old version of the indexer, it can runs with an old"},{"line_number":154,"context_line":"version of its storage back-end."},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Running Gnocchi"}],"source_content_type":"text/x-rst","patch_set":34,"id":"7a740942_2684315c","line":153,"in_reply_to":"7a740942_a7ea7faa","updated":"2015-12-08 10:46:42.000000000","message":"Done","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"fa74d3c26fc840d6e1ca5ed1f2ebe3157e541b9e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"1. Stop the old Gnocchi API server and metric daemon"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"2. Run `gnocchi-upgrade --skip-storage` with the new version of Gnocchi."},{"line_number":145,"context_line":"   This can takes several minutes depending on the size of your index."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"3. Start the new Gnocchi API server."},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":39,"id":"7a740942_07955e85","line":145,"updated":"2015-12-08 16:32:41.000000000","message":"s/takes/take/","commit_id":"89c3f534d47ccbc78735e0719767c46019fd4ccb"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"fa74d3c26fc840d6e1ca5ed1f2ebe3157e541b9e","unresolved":false,"context_lines":[{"line_number":147,"context_line":"3. Start the new Gnocchi API server."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"4. Run `gnocchi-upgrade` with the new version of Gnocchi"},{"line_number":150,"context_line":"   This can takes several hours depending on the size of your storage."},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"5. Start the new Gnocchi metric daemon."},{"line_number":153,"context_line":""}],"source_content_type":"text/x-rst","patch_set":39,"id":"7a740942_27f2da06","line":150,"updated":"2015-12-08 16:32:41.000000000","message":"same","commit_id":"89c3f534d47ccbc78735e0719767c46019fd4ccb"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"fa74d3c26fc840d6e1ca5ed1f2ebe3157e541b9e","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"This will upgrade the indexer and storage in two passes. While a new version of"},{"line_number":155,"context_line":"Gnocchi API cannot run with an old version of the indexer, it can run with an"},{"line_number":156,"context_line":"old version of its storage back-end. For performance reasons, _metricd_ needs"},{"line_number":157,"context_line":"to run an the upgraded storage back-end, otherwise it would spend too much time"},{"line_number":158,"context_line":"checking for upgrade pattern on each run."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"Running Gnocchi"}],"source_content_type":"text/x-rst","patch_set":39,"id":"7a740942_a79eca60","line":157,"range":{"start_line":156,"start_character":38,"end_line":157,"end_character":38},"updated":"2015-12-08 16:32:41.000000000","message":"s/an the/an/","commit_id":"89c3f534d47ccbc78735e0719767c46019fd4ccb"}],"gnocchi/carbonara.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":548,"context_line":"    return int(result[0]), int(result[1])"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"def create_archive_file():"},{"line_number":552,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":553,"context_line":"        description\u003d\"Create a Carbonara file\","},{"line_number":554,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_fdc6da66","side":"PARENT","line":551,"updated":"2015-12-07 22:11:32.000000000","message":"is this just cleanup?","commit_id":"e59963a46bbaedae0cca56197918a5b032792b61"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":548,"context_line":"    return int(result[0]), int(result[1])"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"def create_archive_file():"},{"line_number":552,"context_line":"    parser \u003d argparse.ArgumentParser("},{"line_number":553,"context_line":"        description\u003d\"Create a Carbonara file\","},{"line_number":554,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_4665bdb2","side":"PARENT","line":551,"in_reply_to":"7a740942_fdc6da66","updated":"2015-12-08 10:46:42.000000000","message":"Depends on what you hear by cleanup. We\u0027re going to remove TimeSerieArchive, so I just kept the dump tool for AggregatedTimeSerie.\n\nBut you can\u0027t have an AggregatedTimeSerie without having a BoundTimeSerie somewhere to fill it, so that makes creating at least 2 files with carbonara-create, etc… I could have rewritten all these tools, but since they\u0027re not used on their own, I just dropped them altogether.\n\nThis is going to be even more \"complicated\" since the next steps is to split AggregatedTimeSeries in small pieces.","commit_id":"e59963a46bbaedae0cca56197918a5b032792b61"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    print(\"Aggregation method: %s\" % (ts.aggregation_method))"},{"line_number":552,"context_line":"    timespan \u003d datetime.timedelta(seconds\u003dts.sampling * ts.max_size)"},{"line_number":553,"context_line":"    print(\"\\nTimespan: %ds × %d \u003d %s\" % (ts.sampling, ts.max_size, timespan))"},{"line_number":554,"context_line":"    print(\"Number of measures: %d\" % len(ts))"},{"line_number":555,"context_line":"    table \u003d prettytable.PrettyTable((\"Timestamp\", \"Value\"))"},{"line_number":556,"context_line":"    for k, v in ts.ts.iteritems():"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_fdd9fa22","line":553,"updated":"2015-12-07 22:11:32.000000000","message":"what\u0027s the random newline for?","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":550,"context_line":""},{"line_number":551,"context_line":"    print(\"Aggregation method: %s\" % (ts.aggregation_method))"},{"line_number":552,"context_line":"    timespan \u003d datetime.timedelta(seconds\u003dts.sampling * ts.max_size)"},{"line_number":553,"context_line":"    print(\"\\nTimespan: %ds × %d \u003d %s\" % (ts.sampling, ts.max_size, timespan))"},{"line_number":554,"context_line":"    print(\"Number of measures: %d\" % len(ts))"},{"line_number":555,"context_line":"    table \u003d prettytable.PrettyTable((\"Timestamp\", \"Value\"))"},{"line_number":556,"context_line":"    for k, v in ts.ts.iteritems():"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_c6952d87","line":553,"in_reply_to":"7a740942_fdd9fa22","updated":"2015-12-08 10:46:42.000000000","message":"Right, legacy. removed.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"}],"gnocchi/storage/_carbonara.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            agg_timeseries \u003d self._map_in_thread("},{"line_number":88,"context_line":"                self._get_measures_timeserie,"},{"line_number":89,"context_line":"                ((metric, aggregation, ap.granularity)"},{"line_number":90,"context_line":"                 for ap in reversed(metric.archive_policy.definition)))"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            agg_timeseries \u003d [self._get_measures_timeserie("},{"line_number":93,"context_line":"                metric, aggregation, granularity)]"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_a594b442","line":90,"updated":"2015-12-07 22:11:32.000000000","message":"why does reverse matter?","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            agg_timeseries \u003d self._map_in_thread("},{"line_number":88,"context_line":"                self._get_measures_timeserie,"},{"line_number":89,"context_line":"                ((metric, aggregation, ap.granularity)"},{"line_number":90,"context_line":"                 for ap in reversed(metric.archive_policy.definition)))"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            agg_timeseries \u003d [self._get_measures_timeserie("},{"line_number":93,"context_line":"                metric, aggregation, granularity)]"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_a6d02120","line":90,"in_reply_to":"7a740942_a594b442","updated":"2015-12-08 10:46:42.000000000","message":"It\u0027s the expected output of this method. You\u0027ll notice the tests/API didn\u0027t change. The definition are sorted differently (smaller granularity -\u003e bigger-granularity) in archive policies and this is expected to return data in the bigger -\u003e smaller granularity order.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        except storage.AggregationDoesNotExist:"},{"line_number":110,"context_line":"            # This does not necessarily mean that the metric has not been"},{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_65ed6cb6","line":112,"updated":"2015-12-07 22:11:32.000000000","message":"how does this work with regards to upgrade? if they don\u0027t upgrade storage, we will still figure stuff out for them? is this an eventually consistency type solution?\n\nit seems kind of dangerous to just let things continue without an upgrade.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        except storage.AggregationDoesNotExist:"},{"line_number":110,"context_line":"            # This does not necessarily mean that the metric has not been"},{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_e60ce9ed","line":112,"in_reply_to":"7a740942_65ed6cb6","updated":"2015-12-08 10:46:42.000000000","message":"Yes, for reading we support reading data from the old place. But we never write to the old place.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                ts \u003d None"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if ts is None:"},{"line_number":135,"context_line":"            for d in metric.archive_policy.definition:"},{"line_number":136,"context_line":"                if d.granularity \u003d\u003d granularity:"},{"line_number":137,"context_line":"                    ts \u003d carbonara.AggregatedTimeSerie("},{"line_number":138,"context_line":"                        aggregation_method\u003daggregation,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_65f7ac59","line":135,"updated":"2015-12-07 22:11:32.000000000","message":"unrelated but why do we have this fallback section for?","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                ts \u003d None"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        if ts is None:"},{"line_number":135,"context_line":"            for d in metric.archive_policy.definition:"},{"line_number":136,"context_line":"                if d.granularity \u003d\u003d granularity:"},{"line_number":137,"context_line":"                    ts \u003d carbonara.AggregatedTimeSerie("},{"line_number":138,"context_line":"                        aggregation_method\u003daggregation,"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_c61f6d06","line":135,"in_reply_to":"7a740942_65f7ac59","updated":"2015-12-08 10:46:42.000000000","message":"ts can be None if we failed to read the data (data corruption) or the data does not exist at all.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b943bca3f17e6b36fbcc1dc2f8b1a86c94861815","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"},{"line_number":116,"context_line":"                    storage.AggregationDoesNotExist):"},{"line_number":117,"context_line":"                # It really does not exist"}],"source_content_type":"text/x-python","patch_set":38,"id":"7a740942_70a42807","line":114,"updated":"2015-12-08 13:18:37.000000000","message":"if we upgrade while this happens, will it let me? and if it does, won\u0027t i risk double reading a value?","commit_id":"0da04d4f72e377dbf2f6db462241fdde6b519c33"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5dc77c38118693d50d7de5d017cfac8b241921d4","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"},{"line_number":116,"context_line":"                    storage.AggregationDoesNotExist):"},{"line_number":117,"context_line":"                # It really does not exist"}],"source_content_type":"text/x-python","patch_set":38,"id":"7a740942_8b008567","line":114,"in_reply_to":"7a740942_70a42807","updated":"2015-12-08 13:41:22.000000000","message":"It will let you (it never locks to read) and it\u0027ll work correctly as write operation are atomic anyway. The only risk is that you could read a granularity from the old archive and the next from a migrated one, but that shouldn\u0027t be a big issue. Data processing is async anyway, so that could happen anyhow in the future too, migration or not.","commit_id":"0da04d4f72e377dbf2f6db462241fdde6b519c33"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b943bca3f17e6b36fbcc1dc2f8b1a86c94861815","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                            metric, ts.aggregation_method,"},{"line_number":214,"context_line":"                            ts.sampling,"},{"line_number":215,"context_line":"                            ts.serialize())"},{"line_number":216,"context_line":"                    self._delete_metric_archives(metric)"},{"line_number":217,"context_line":"                    LOG.info(\"Migrated metric %s to new format\" % metric)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def upgrade(self, index):"}],"source_content_type":"text/x-python","patch_set":38,"id":"7a740942_707bc87b","line":216,"updated":"2015-12-08 13:18:37.000000000","message":"i think we need to move this outside the loop, or else it\u0027ll delete after first aggregation method?","commit_id":"0da04d4f72e377dbf2f6db462241fdde6b519c33"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5dc77c38118693d50d7de5d017cfac8b241921d4","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                            metric, ts.aggregation_method,"},{"line_number":214,"context_line":"                            ts.sampling,"},{"line_number":215,"context_line":"                            ts.serialize())"},{"line_number":216,"context_line":"                    self._delete_metric_archives(metric)"},{"line_number":217,"context_line":"                    LOG.info(\"Migrated metric %s to new format\" % metric)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def upgrade(self, index):"}],"source_content_type":"text/x-python","patch_set":38,"id":"7a740942_8b22c5a1","line":216,"in_reply_to":"7a740942_707bc87b","updated":"2015-12-08 13:41:22.000000000","message":"Nice catch! I\u0027ve added another agg method in the test to prove that it works.","commit_id":"0da04d4f72e377dbf2f6db462241fdde6b519c33"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"fa74d3c26fc840d6e1ca5ed1f2ebe3157e541b9e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"},{"line_number":116,"context_line":"                    storage.AggregationDoesNotExist):"},{"line_number":117,"context_line":"                # It really does not exist"}],"source_content_type":"text/x-python","patch_set":39,"id":"7a740942_ea3d79c4","line":114,"updated":"2015-12-08 16:32:41.000000000","message":"so if we don\u0027t upgrade, and we write the data to new aggregated file. does that mean all the related aggregated data in non-upgraded archive is not used (until upgrade applied)?","commit_id":"89c3f534d47ccbc78735e0719767c46019fd4ccb"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"376e5746264be338462f27ad95c134ea35d7dfef","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            # created yet. It can be an old metric with a TimeSerieArchive."},{"line_number":112,"context_line":"            # Let\u0027s try that."},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                data \u003d self._get_metric_archive(metric, aggregation)"},{"line_number":115,"context_line":"            except (storage.MetricDoesNotExist,"},{"line_number":116,"context_line":"                    storage.AggregationDoesNotExist):"},{"line_number":117,"context_line":"                # It really does not exist"}],"source_content_type":"text/x-python","patch_set":39,"id":"7a740942_4529f799","line":114,"in_reply_to":"7a740942_ea3d79c4","updated":"2015-12-09 09:33:57.000000000","message":"You are not supposed to run metricd until you upgrade. Metricd is only one that writes and it always write to the new location.\n\nAt least for now.","commit_id":"89c3f534d47ccbc78735e0719767c46019fd4ccb"}],"gnocchi/storage/ceph.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c75cdb5cd24a8353351ed164e55e681d2833fab1","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        except rados.ObjectNotFound:"},{"line_number":237,"context_line":"            raise storage.AggregationDoesNotExist(metric, aggregation)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def _store_metric_archive(self, metric, aggregation, data):"},{"line_number":240,"context_line":"        \"\"\"Stores data in the place we used to store TimeSerieArchive.\"\"\""},{"line_number":241,"context_line":"        name \u003d self._get_object_name(metric, aggregation)"},{"line_number":242,"context_line":"        with self._get_ioctx() as ioctx:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a8ffd7b_44297e36","line":239,"updated":"2015-12-02 07:58:39.000000000","message":"Why do we keep this method ?","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c30e03748ae07511ba0275eb5167f5a18b70a31f","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        except rados.ObjectNotFound:"},{"line_number":237,"context_line":"            raise storage.AggregationDoesNotExist(metric, aggregation)"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    def _store_metric_archive(self, metric, aggregation, data):"},{"line_number":240,"context_line":"        \"\"\"Stores data in the place we used to store TimeSerieArchive.\"\"\""},{"line_number":241,"context_line":"        name \u003d self._get_object_name(metric, aggregation)"},{"line_number":242,"context_line":"        with self._get_ioctx() as ioctx:"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a8ffd7b_2c6ba5f2","line":239,"in_reply_to":"9a8ffd7b_44297e36","updated":"2015-12-03 14:02:06.000000000","message":"It\u0027s only used in test, to test migration. :)","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return self.rados.open_ioctx(self.pool)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @staticmethod"},{"line_number":128,"context_line":"    def _get_object_name(metric, lock_name, aggregation\u003dNone):"},{"line_number":129,"context_line":"        v \u003d \"gnocchi_%s_%s\" % (metric.id, lock_name)"},{"line_number":130,"context_line":"        if aggregation is None:"},{"line_number":131,"context_line":"            return str(v)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_d8968c3e","line":128,"updated":"2015-12-07 22:11:32.000000000","message":"s/aggregation/granularity/ seems like lock_name \u003d\u003d aggregation","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        return self.rados.open_ioctx(self.pool)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @staticmethod"},{"line_number":128,"context_line":"    def _get_object_name(metric, lock_name, aggregation\u003dNone):"},{"line_number":129,"context_line":"        v \u003d \"gnocchi_%s_%s\" % (metric.id, lock_name)"},{"line_number":130,"context_line":"        if aggregation is None:"},{"line_number":131,"context_line":"            return str(v)"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_a67ee116","line":128,"in_reply_to":"7a740942_d8968c3e","updated":"2015-12-08 10:46:42.000000000","message":"Done","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"}],"gnocchi/storage/file.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c75cdb5cd24a8353351ed164e55e681d2833fab1","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                raise storage.MetricDoesNotExist(metric)"},{"line_number":231,"context_line":"            raise"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def _store_metric_archive(self, metric, aggregation, data):"},{"line_number":234,"context_line":"        \"\"\"Stores data in the place we used to store TimeSerieArchive.\"\"\""},{"line_number":235,"context_line":"        self._atomic_file_store("},{"line_number":236,"context_line":"            self._build_metric_archive_path(metric, aggregation),"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a8ffd7b_e420b24b","line":233,"updated":"2015-12-02 07:58:39.000000000","message":"Why do we keep this method ?","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                raise storage.MetricDoesNotExist(metric)"},{"line_number":214,"context_line":"            raise"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    # The following methods deal with Gnocchi \u003c\u003d 1.3 archives"},{"line_number":217,"context_line":"    def _build_metric_archive_path(self, metric, aggregation):"},{"line_number":218,"context_line":"        return os.path.join(self._build_metric_dir(metric), aggregation)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_188c147e","line":216,"updated":"2015-12-07 22:11:32.000000000","message":"this is sort of strange to be honest. if these are strictly for test we probably shouldn\u0027t include them here.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":213,"context_line":"                raise storage.MetricDoesNotExist(metric)"},{"line_number":214,"context_line":"            raise"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    # The following methods deal with Gnocchi \u003c\u003d 1.3 archives"},{"line_number":217,"context_line":"    def _build_metric_archive_path(self, metric, aggregation):"},{"line_number":218,"context_line":"        return os.path.join(self._build_metric_dir(metric), aggregation)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_46bdbdb5","line":216,"in_reply_to":"7a740942_188c147e","updated":"2015-12-08 10:46:42.000000000","message":"Only _store is for test (to test for upgrade), the rest is used by the upgrade code.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    def _delete_metric_archives(self, metric):"},{"line_number":240,"context_line":"        for agg in metric.archive_policy.aggregation_methods:"},{"line_number":241,"context_line":"            try:"},{"line_number":242,"context_line":"                os.unlink(self._build_metric_archive_path(metric, agg))"},{"line_number":243,"context_line":"            except OSError as e:"},{"line_number":244,"context_line":"                if e.errno !\u003d errno.ENOENT:"},{"line_number":245,"context_line":"                    # NOTE(jd) Maybe the metric has never been created (no"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_18e3b434","line":242,"updated":"2015-12-07 22:11:32.000000000","message":"why is this different from _delete_metric?","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"}],"gnocchi/storage/swift.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c75cdb5cd24a8353351ed164e55e681d2833fab1","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            raise"},{"line_number":212,"context_line":"        return contents"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _store_metric_archive(self, metric, aggregation, data):"},{"line_number":215,"context_line":"        \"\"\"Stores data in the place we used to store TimeSerieArchive.\"\"\""},{"line_number":216,"context_line":"        self.swift.put_object(self._container_name(metric), aggregation, data)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"9a8ffd7b_041cd611","line":214,"updated":"2015-12-02 07:58:39.000000000","message":"Why do we keep this method ?","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"}],"gnocchi/tests/gabbi/gabbits/metric_granularity.yaml":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"c75cdb5cd24a8353351ed164e55e681d2833fab1","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    - name: get measurements invalid granularity"},{"line_number":44,"context_line":"      url: /v1/metric/$RESPONSE[\u0027$[0].id\u0027]/measures?granularity\u003d42"},{"line_number":45,"context_line":"      status: 404"},{"line_number":46,"context_line":"      response_strings:"},{"line_number":47,"context_line":"        - Granularity \u002742.0\u0027 for metric $RESPONSE[\u0027$[0].id\u0027] does not exist"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":32,"id":"9a8ffd7b_44441e1a","line":45,"updated":"2015-12-02 07:58:39.000000000","message":"At first glance 404 looks weird because the url is valid.\nBut when we think this \"Not found\" is for granularity not found that looks good.\n\nI hope this will not confuse people.","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"c30e03748ae07511ba0275eb5167f5a18b70a31f","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    - name: get measurements invalid granularity"},{"line_number":44,"context_line":"      url: /v1/metric/$RESPONSE[\u0027$[0].id\u0027]/measures?granularity\u003d42"},{"line_number":45,"context_line":"      status: 404"},{"line_number":46,"context_line":"      response_strings:"},{"line_number":47,"context_line":"        - Granularity \u002742.0\u0027 for metric $RESPONSE[\u0027$[0].id\u0027] does not exist"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":32,"id":"9a8ffd7b_6c4c4d9e","line":45,"in_reply_to":"9a8ffd7b_44441e1a","updated":"2015-12-03 14:02:06.000000000","message":"Well, the response string is pretty clear and has a good error message!","commit_id":"cec21b62b3b1fadccf0f9bbc260b4f0eaa29d298"}],"gnocchi/tests/storage/test_carbonara.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright © 2015 eNovance"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_821e515d","line":3,"updated":"2015-12-07 22:11:32.000000000","message":"\\o/","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright © 2015 eNovance"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_c6c9ad5a","line":3,"in_reply_to":"7a740942_821e515d","updated":"2015-12-08 10:46:42.000000000","message":"We still rule the world.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        self.assertRaises("},{"line_number":75,"context_line":"            storage.AggregationDoesNotExist,"},{"line_number":76,"context_line":"            self.storage._get_metric_archive,"},{"line_number":77,"context_line":"            self.metric, \"mean\")"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_delete_metric_not_upgraded(self):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_a286edd8","line":76,"range":{"start_line":76,"start_character":25,"end_line":76,"end_character":44},"updated":"2015-12-07 22:11:32.000000000","message":"i think we should check this actually is valid before upgrade","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        self.assertRaises("},{"line_number":75,"context_line":"            storage.AggregationDoesNotExist,"},{"line_number":76,"context_line":"            self.storage._get_metric_archive,"},{"line_number":77,"context_line":"            self.metric, \"mean\")"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_delete_metric_not_upgraded(self):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_e6ce292c","line":76,"in_reply_to":"7a740942_a286edd8","updated":"2015-12-08 10:46:42.000000000","message":"Done","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"28897ffad6909369e781d424c258d017ab8ea4d4","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_delete_metric_not_upgraded(self):"},{"line_number":80,"context_line":"        self.storage.delete_metric(self.metric)"},{"line_number":81,"context_line":"        self.assertEqual([], self.storage.get_measures(self.metric))"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_c2f0d969","line":81,"updated":"2015-12-07 22:11:32.000000000","message":"we don\u0027t actually upgrade at any point here?","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"11b198b78bf74656101af81d45196e4b2f7e48dc","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_delete_metric_not_upgraded(self):"},{"line_number":80,"context_line":"        self.storage.delete_metric(self.metric)"},{"line_number":81,"context_line":"        self.assertEqual([], self.storage.get_measures(self.metric))"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a740942_e6e5c9a3","line":81,"in_reply_to":"7a740942_c2f0d969","updated":"2015-12-08 10:46:42.000000000","message":"As the test name implies, no we don\u0027t. The point is to make sure that we delete everything when we delete a metric that has not been upgraded.","commit_id":"b32f8c6518c79aa4fc7559a3e3695b27396177b4"}]}
