)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"db816e40fc95a515d272e5df1ca0d217ca266076","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-06-02 12:05:15 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Convert instance to primitive for metadata cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iffbd75047ab595981fb700752daadf78f6f5f2c8"},{"line_number":10,"context_line":"Closes-bug: 1694666"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f1d235d_6c18d180","line":8,"updated":"2017-06-29 14:41:07.000000000","message":"Obviously more words here...","commit_id":"9c115ee53c632480de1072b23bf63d2c9f86066a"}],"nova/api/metadata/handler.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"db816e40fc95a515d272e5df1ca0d217ca266076","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        if CONF.api.metadata_cache_expiration \u003e 0:"},{"line_number":74,"context_line":"            data_for_cache \u003d copy.deepcopy(data)"},{"line_number":75,"context_line":"            data_for_cache.instance \u003d data.instance.obj_to_primitive()"},{"line_number":76,"context_line":"            LOG.debug(\"Converted instance to primitive for caching\")"},{"line_number":77,"context_line":"            self._cache.set(cache_key, data_for_cache)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_4c8875c5","line":76,"updated":"2017-06-29 14:41:07.000000000","message":"This is probably not a super-useful log message to leave in place, right?","commit_id":"9c115ee53c632480de1072b23bf63d2c9f86066a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"db816e40fc95a515d272e5df1ca0d217ca266076","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            data_for_cache \u003d copy.deepcopy(data)"},{"line_number":75,"context_line":"            data_for_cache.instance \u003d data.instance.obj_to_primitive()"},{"line_number":76,"context_line":"            LOG.debug(\"Converted instance to primitive for caching\")"},{"line_number":77,"context_line":"            self._cache.set(cache_key, data_for_cache)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        return data"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_8c132d67","line":77,"updated":"2017-06-29 14:41:07.000000000","message":"So here you\u0027ve set something in the cache that older services won\u0027t be able to use, right? I think this effectively breaks upgrades while your services are mixed versions, and then after that for the lifetime of your cache entry.\n\nI\u0027m not really sure what to suggest here. Trying to coordinate a switchover based on service version would likely be a bit ugly. We probably need to use a different cache key for the new format or something like that.","commit_id":"9c115ee53c632480de1072b23bf63d2c9f86066a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"db816e40fc95a515d272e5df1ca0d217ca266076","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        cache_key \u003d \u0027metadata-%s\u0027 % instance_id"},{"line_number":83,"context_line":"        data \u003d self._cache.get(cache_key)"},{"line_number":84,"context_line":"        if data:"},{"line_number":85,"context_line":"            data.instance \u003d instance.Instance.obj_from_primitive(data.instance)"},{"line_number":86,"context_line":"            LOG.debug(\"Using cached metadata for %s, with instance loaded \""},{"line_number":87,"context_line":"                      \"from cached primitive\", address)"},{"line_number":88,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_ef3173ee","line":85,"updated":"2017-06-29 14:41:07.000000000","message":"This is an improvement for sure, but it still means we\u0027re pickling a random python object that isn\u0027t versioned, which is what makes this dangerous and hard to evolve in the first place. I\u0027d rather address that once instead of this iteration, and then doing the dance again when we go back to fix that problem.","commit_id":"9c115ee53c632480de1072b23bf63d2c9f86066a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"db816e40fc95a515d272e5df1ca0d217ca266076","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if CONF.api.metadata_cache_expiration \u003e 0:"},{"line_number":96,"context_line":"            data_for_cache \u003d copy.deepcopy(data)"},{"line_number":97,"context_line":"            data_for_cache.instance \u003d data.instance.obj_to_primitive()"},{"line_number":98,"context_line":"            LOG.debug(\"Converted instance to primitive for caching\")"},{"line_number":99,"context_line":"            self._cache.set(cache_key, data_for_cache)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        return data"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_ccbda569","line":98,"updated":"2017-06-29 14:41:07.000000000","message":"ditto.","commit_id":"9c115ee53c632480de1072b23bf63d2c9f86066a"}]}
