)]}'
{"swift/cli/info.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    datadir \u003d DATADIR_BASE"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    # try to extract policy index from datafile disk path"},{"line_number":344,"context_line":"    policy \u003d extract_policy(datafile)"},{"line_number":345,"context_line":"    if policy:"},{"line_number":346,"context_line":"        policy_index \u003d int(policy)"},{"line_number":347,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2290db4d","line":344,"updated":"2015-03-11 22:02:35.000000000","message":"why not have extract policy() return 0 instead having the condition here?  Maybe I\u0027ll see upcoming....","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    datadir \u003d DATADIR_BASE"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    # try to extract policy index from datafile disk path"},{"line_number":344,"context_line":"    policy \u003d extract_policy(datafile)"},{"line_number":345,"context_line":"    if policy:"},{"line_number":346,"context_line":"        policy_index \u003d int(policy)"},{"line_number":347,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_443a3a99","line":344,"in_reply_to":"9a80dd14_2290db4d","updated":"2015-03-12 04:13:59.000000000","message":"oh this code in info is a mess, it was definitely not the primary use case for this method, in fact you can see I go to some effort to take the extracted policy and turn it into policy_index (which is sorta contrary to the spirt of the patch) but it was the quickest thing to not have to mess with this janky cli code.","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/common/request_helpers.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    args are passed through to :meth:`split_and_validate_path`."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    :returns: a list, result of :meth:`split_and_validate_path` with"},{"line_number":91,"context_line":"              storage_policy_index appended on the end"},{"line_number":92,"context_line":"    :raises: HTTPBadRequest"},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":"    policy_idx \u003d request.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027, \u00270\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_1d40bf55","side":"PARENT","line":91,"updated":"2015-03-11 08:00:31.000000000","message":"bah should say StoragePolicy instance","commit_id":"b195e22ac8da67c579e694782646262026613c94"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    args are passed through to :meth:`split_and_validate_path`."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    :returns: a list, result of :meth:`split_and_validate_path` with"},{"line_number":91,"context_line":"              storage_policy_index appended on the end"},{"line_number":92,"context_line":"    :raises: HTTPBadRequest"},{"line_number":93,"context_line":"    \"\"\""},{"line_number":94,"context_line":"    policy_idx \u003d request.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027, \u00270\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_44615aa7","side":"PARENT","line":91,"in_reply_to":"9a80dd14_1d40bf55","updated":"2015-03-12 04:13:59.000000000","message":"Done","commit_id":"b195e22ac8da67c579e694782646262026613c94"}],"swift/common/storage_policy.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"399f289ff19f7d0ae9ce4eaf95c90154b0aeb1b4","unresolved":false,"context_lines":[{"line_number":707,"context_line":"            try:"},{"line_number":708,"context_line":"                index \u003d int(index)"},{"line_number":709,"context_line":"            except ValueError:"},{"line_number":710,"context_line":"                return None"},{"line_number":711,"context_line":"        return self.by_index.get(index)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_56d6c74f","line":710,"updated":"2015-03-10 12:35:41.000000000","message":"Should we raise PolicyError here? If None assigned to a policy, the reference of an instance variable might cause no attribute error on proxy controllers. (e.g. storage_policy.stores_objects_verbatim on swift.proxy.server)\n\nIn the case, PolicyError seems helpful to understand rather than  No attribute error.","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0187c1d866d91721683b562f0f1b8d79fd29b72","unresolved":false,"context_lines":[{"line_number":707,"context_line":"            try:"},{"line_number":708,"context_line":"                index \u003d int(index)"},{"line_number":709,"context_line":"            except ValueError:"},{"line_number":710,"context_line":"                return None"},{"line_number":711,"context_line":"        return self.by_index.get(index)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_f3a89b22","line":710,"in_reply_to":"9a80dd14_56d6c74f","updated":"2015-03-10 17:20:06.000000000","message":"Maybe, originally I think get_by_index was supposed to act similar to the get method on the dictionary.  The PolicyError is harder for the caller to ignore, but maybe more verbose.\n\n    policy \u003d POLICIES.get_by_index(policy_index)\n    if not policy:\n        raise ContextAppropriateError()\n\nvs.\n\n    try:\n        policy \u003d POLICIES.from_index(policy_index)\n    except PolicyError:\n        raise ContextAppropriateError()\n\nI think I\u0027d be find adding from_index, but I\u0027m not sure if I\u0027d go so far as to replace all callers of get_by_index with it - maybe.  Depends on how strongly others feel about it!  :P","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"cd7f2da4d207137a9b42eac6dc0f76d9a7fc0c25","unresolved":false,"context_lines":[{"line_number":707,"context_line":"            try:"},{"line_number":708,"context_line":"                index \u003d int(index)"},{"line_number":709,"context_line":"            except ValueError:"},{"line_number":710,"context_line":"                return None"},{"line_number":711,"context_line":"        return self.by_index.get(index)"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_91be65d3","line":710,"in_reply_to":"9a80dd14_f3a89b22","updated":"2015-03-11 01:01:15.000000000","message":"Makes me sense. Hum...either looks fine to me. Anyways, I am realized this suggestion seems not so urgent because basically it seems just for safety if X-Backend-Storage-Policy-Index is wrong. (I hope it doesn\u0027t appear) I agreed you to wait others feelings. Thanks :)","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        policy \u003d POLICIES.get_by_index(policy_or_index)"},{"line_number":75,"context_line":"        if policy is None:"},{"line_number":76,"context_line":"            raise PolicyError(\"Unknown policy\", index\u003dpolicy_or_index)"},{"line_number":77,"context_line":"    return _get_policy_string(base, int(policy))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def split_policy_string(policy_string):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_1d3a5634","line":77,"updated":"2015-03-11 22:02:35.000000000","message":"real quick I think you covered this with Alistair but why does int(policy) make sense here?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        policy \u003d POLICIES.get_by_index(policy_or_index)"},{"line_number":75,"context_line":"        if policy is None:"},{"line_number":76,"context_line":"            raise PolicyError(\"Unknown policy\", index\u003dpolicy_or_index)"},{"line_number":77,"context_line":"    return _get_policy_string(base, int(policy))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def split_policy_string(policy_string):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_242c664a","line":77,"in_reply_to":"9a80dd14_1d3a5634","updated":"2015-03-12 04:13:59.000000000","message":"@acoles said the only point I had that made sense was the strong hint about the type being int","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/obj/diskfile.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"399f289ff19f7d0ae9ce4eaf95c90154b0aeb1b4","unresolved":false,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    :param hsh_path: object hash path"},{"line_number":514,"context_line":"    :param reclaim_age: age in seconds at which to remove tombstones"},{"line_number":515,"context_line":"    :param policy: the policy"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    :returns: list of files remaining in the directory, reverse sorted"},{"line_number":518,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_56e327d8","line":515,"updated":"2015-03-10 12:35:41.000000000","message":"To be helpful, \"the storage policy instance\" would be better, IMHO.","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0187c1d866d91721683b562f0f1b8d79fd29b72","unresolved":false,"context_lines":[{"line_number":512,"context_line":""},{"line_number":513,"context_line":"    :param hsh_path: object hash path"},{"line_number":514,"context_line":"    :param reclaim_age: age in seconds at which to remove tombstones"},{"line_number":515,"context_line":"    :param policy: the policy"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    :returns: list of files remaining in the directory, reverse sorted"},{"line_number":518,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_a6c26384","line":515,"in_reply_to":"9a80dd14_56e327d8","updated":"2015-03-10 17:20:06.000000000","message":"Done","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    :returns: correct subclass of SuffixHashes"},{"line_number":289,"context_line":"    \"\"\""},{"line_number":290,"context_line":"    if policy.policy_type \u003d\u003d REPL_POLICY:"},{"line_number":291,"context_line":"        suffix_hashes \u003d SuffixHashesRepl(hashes_file)"},{"line_number":292,"context_line":"    else:"},{"line_number":293,"context_line":"        suffix_hashes \u003d SuffixHashesEC(hashes_file)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ddeb5e76","line":290,"updated":"2015-03-11 22:02:35.000000000","message":"so much nicer","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":517,"context_line":"    :returns: list of files remaining in the directory, reverse sorted"},{"line_number":518,"context_line":"    \"\"\""},{"line_number":519,"context_line":"    if not policy:"},{"line_number":520,"context_line":"        raise TypeError(\u0027You need to specify the policy\u0027)"},{"line_number":521,"context_line":"    files \u003d listdir(hsh_path)"},{"line_number":522,"context_line":"    if len(files) \u003d\u003d 1:"},{"line_number":523,"context_line":"        if files[0].endswith(\u0027.ts\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_18144df4","line":520,"updated":"2015-03-11 08:00:31.000000000","message":"I don\u0027t care for validating the call signature like this, but I couldn\u0027t get anyone else to confirm they\u0027re not using hash_cleanup_listdir(hsh_path, reclaim_age) in some script somewhere - I checked that the SwiftStack code isn\u0027t - i updated all callers in tree to use named parameters for policy and reclaim_age","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"27fd53c9ae01d7b533dd2d88a21712d7691d62cb","unresolved":false,"context_lines":[{"line_number":517,"context_line":"    :returns: list of files remaining in the directory, reverse sorted"},{"line_number":518,"context_line":"    \"\"\""},{"line_number":519,"context_line":"    if not policy:"},{"line_number":520,"context_line":"        raise TypeError(\u0027You need to specify the policy\u0027)"},{"line_number":521,"context_line":"    files \u003d listdir(hsh_path)"},{"line_number":522,"context_line":"    if len(files) \u003d\u003d 1:"},{"line_number":523,"context_line":"        if files[0].endswith(\u0027.ts\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a4ab0088","line":520,"in_reply_to":"9a80dd14_18144df4","updated":"2015-03-11 18:26:05.000000000","message":"Perhaps \n\n  policy \u003d\u003d policy or POLICIES.legacy\n\nwhere POLICIES.legacy (or POLICIES.default - like, there has to be a default) is something new in storage_poicy.py?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":517,"context_line":"    :returns: list of files remaining in the directory, reverse sorted"},{"line_number":518,"context_line":"    \"\"\""},{"line_number":519,"context_line":"    if not policy:"},{"line_number":520,"context_line":"        raise TypeError(\u0027You need to specify the policy\u0027)"},{"line_number":521,"context_line":"    files \u003d listdir(hsh_path)"},{"line_number":522,"context_line":"    if len(files) \u003d\u003d 1:"},{"line_number":523,"context_line":"        if files[0].endswith(\u0027.ts\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_049a026e","line":520,"in_reply_to":"9a80dd14_a4ab0088","updated":"2015-03-12 04:13:59.000000000","message":"well the problem is that neither POLICIES.legacy or POLICIES.default is *really* a safe default.  This function just needs to know the policy - and only the caller has better context to figure that out.\n\nThe only reason it\u0027s kwarg is support the old calling syntax of reclaim_age as the second positional argument.  You still get a TypeError trying to call it that way - but at least you know what you need to do to fix your code.\n\nI guess I don\u0027t have a good reason to not try to extract_policy from hsh_path except that it enforces better cleanliness in our test code this way.","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"        self._bytes_per_sync \u003d mgr.bytes_per_sync"},{"line_number":1526,"context_line":"        self._use_splice \u003d use_splice"},{"line_number":1527,"context_line":"        self._pipe_size \u003d pipe_size"},{"line_number":1528,"context_line":"        if not policy:"},{"line_number":1529,"context_line":"            raise TypeError(\u0027You need to specify the policy\u0027)"},{"line_number":1530,"context_line":"        self.policy \u003d policy"},{"line_number":1531,"context_line":"        self._frag_index \u003d int(frag_index) if frag_index is not None else None"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_81298439","line":1528,"updated":"2015-03-11 22:02:35.000000000","message":"just curious, why make it an opt parm and then raise here if not provided, just for a friendlier message?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":1525,"context_line":"        self._bytes_per_sync \u003d mgr.bytes_per_sync"},{"line_number":1526,"context_line":"        self._use_splice \u003d use_splice"},{"line_number":1527,"context_line":"        self._pipe_size \u003d pipe_size"},{"line_number":1528,"context_line":"        if not policy:"},{"line_number":1529,"context_line":"            raise TypeError(\u0027You need to specify the policy\u0027)"},{"line_number":1530,"context_line":"        self.policy \u003d policy"},{"line_number":1531,"context_line":"        self._frag_index \u003d int(frag_index) if frag_index is not None else None"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_448b1a1e","line":1528,"in_reply_to":"9a80dd14_81298439","updated":"2015-03-12 04:13:59.000000000","message":"well it was already a named argument - definitely trying to give a louder and more direct error message - did you see an alternative?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/obj/replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        \"\"\""},{"line_number":111,"context_line":"        return self.sync_method(node, job, suffixes, *args, **kwargs)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def load_object_ring(self, policy):"},{"line_number":114,"context_line":"        \"\"\""},{"line_number":115,"context_line":"        Make sure the policy\u0027s rings are loaded."},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_7819c921","line":113,"updated":"2015-03-11 08:00:31.000000000","message":"a few other daemons still have get_object_ring, I think this is better but didn\u0027t clean them all up.  not sure if that\u0027s laziness or pragmatism.","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        jobs \u003d []"},{"line_number":538,"context_line":"        ips \u003d whataremyips()"},{"line_number":539,"context_line":"        for policy in POLICIES:"},{"line_number":540,"context_line":"            if (policy.policy_type \u003d\u003d REPL_POLICY"},{"line_number":541,"context_line":"                    and override_policies is not None"},{"line_number":542,"context_line":"                    and str(int(policy)) not in override_policies):"},{"line_number":543,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_412eacfb","line":540,"updated":"2015-03-11 22:02:35.000000000","message":"had to fix this on my reconstructor patch, the first condition should be standalone and everything under it indented or it\u0027ll build repl jobs for EC policies (see https://review.openstack.org/#/c/131872/26/swift/obj/replicator.py) or just wait","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":537,"context_line":"        jobs \u003d []"},{"line_number":538,"context_line":"        ips \u003d whataremyips()"},{"line_number":539,"context_line":"        for policy in POLICIES:"},{"line_number":540,"context_line":"            if (policy.policy_type \u003d\u003d REPL_POLICY"},{"line_number":541,"context_line":"                    and override_policies is not None"},{"line_number":542,"context_line":"                    and str(int(policy)) not in override_policies):"},{"line_number":543,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_442ebafb","line":540,"in_reply_to":"9a80dd14_412eacfb","updated":"2015-03-12 04:13:59.000000000","message":"oic, ok yeah we could fix it here - do you also have a test case?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                    and str(int(policy)) not in override_policies):"},{"line_number":543,"context_line":"                continue"},{"line_number":544,"context_line":"            # ensure rings are loaded for policy"},{"line_number":545,"context_line":"            self.load_object_ring(policy)"},{"line_number":546,"context_line":"            jobs +\u003d self.build_replication_jobs("},{"line_number":547,"context_line":"                policy, ips, override_devices\u003doverride_devices,"},{"line_number":548,"context_line":"                override_partitions\u003doverride_partitions)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_8138a43e","line":545,"updated":"2015-03-11 22:02:35.000000000","message":"not obvious to me why this is needed?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":542,"context_line":"                    and str(int(policy)) not in override_policies):"},{"line_number":543,"context_line":"                continue"},{"line_number":544,"context_line":"            # ensure rings are loaded for policy"},{"line_number":545,"context_line":"            self.load_object_ring(policy)"},{"line_number":546,"context_line":"            jobs +\u003d self.build_replication_jobs("},{"line_number":547,"context_line":"                policy, ips, override_devices\u003doverride_devices,"},{"line_number":548,"context_line":"                override_partitions\u003doverride_partitions)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_04a84276","line":545,"in_reply_to":"9a80dd14_8138a43e","updated":"2015-03-12 04:13:59.000000000","message":"because later I just grab job[\u0027policy\u0027].object_ring instead of using get_object_ring.\n\nThis fails earlier if you don\u0027t have rings on disk.","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/obj/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":448,"context_line":"            if orig_delete_at:"},{"line_number":449,"context_line":"                self.delete_at_update(\u0027DELETE\u0027, orig_delete_at, account,"},{"line_number":450,"context_line":"                                      container, obj, request, device,"},{"line_number":451,"context_line":"                                      int(policy))"},{"line_number":452,"context_line":"        try:"},{"line_number":453,"context_line":"            disk_file.write_metadata(metadata)"},{"line_number":454,"context_line":"        except (DiskFileXattrNotSupported, DiskFileNoSpace):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_78f0e9c9","line":451,"updated":"2015-03-11 08:00:31.000000000","message":"hrmm... signature of delete_at_update seems to want policy instance, not sure why there\u0027s no failing tests for this.","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":448,"context_line":"            if orig_delete_at:"},{"line_number":449,"context_line":"                self.delete_at_update(\u0027DELETE\u0027, orig_delete_at, account,"},{"line_number":450,"context_line":"                                      container, obj, request, device,"},{"line_number":451,"context_line":"                                      int(policy))"},{"line_number":452,"context_line":"        try:"},{"line_number":453,"context_line":"            disk_file.write_metadata(metadata)"},{"line_number":454,"context_line":"        except (DiskFileXattrNotSupported, DiskFileNoSpace):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_e7ac108f","line":451,"in_reply_to":"9a80dd14_78f0e9c9","updated":"2015-03-12 04:13:59.000000000","message":"ok, so the only thing that delete_at_update was doing with the policy param (currently) was passing it to the datadir functions which is one of the last places that accept *either* an int or policy index - so it just didn\u0027t make a difference - but it was definitely a bug in my mind.\n\nMy solution was to teach get_policy_string to blow up when it get\u0027s an integer and cleanup any callers in our code base that triggered a test failure when they weren\u0027t handing it a real policy.\n\nI think it might be worth just removing the overloading from that function to keep us honest - but I\u0027m worried about some caller not covered by a test case and me not being able to effectively find all the partial aliases of that function with grep - so I didn\u0027t do it.\n\nMaybe better to leave a harmless bug than a possible real bug in the pursuit of some sort of code cleanliness?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":669,"context_line":"        keep_cache \u003d self.keep_cache_private or ("},{"line_number":670,"context_line":"            \u0027X-Auth-Token\u0027 not in request.headers and"},{"line_number":671,"context_line":"            \u0027X-Storage-Token\u0027 not in request.headers)"},{"line_number":672,"context_line":"        node_index \u003d request.headers.get(\u0027X-Backend-Node-Index\u0027)"},{"line_number":673,"context_line":"        try:"},{"line_number":674,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":675,"context_line":"                device, partition, account, container, obj,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a18848c7","line":672,"updated":"2015-03-11 22:02:35.000000000","message":"man when did this start getting set unconditionally, cool :)","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"14daaa14e2e11ef77a61d71ae5084f12eeed0296","unresolved":false,"context_lines":[{"line_number":669,"context_line":"        keep_cache \u003d self.keep_cache_private or ("},{"line_number":670,"context_line":"            \u0027X-Auth-Token\u0027 not in request.headers and"},{"line_number":671,"context_line":"            \u0027X-Storage-Token\u0027 not in request.headers)"},{"line_number":672,"context_line":"        node_index \u003d request.headers.get(\u0027X-Backend-Node-Index\u0027)"},{"line_number":673,"context_line":"        try:"},{"line_number":674,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":675,"context_line":"                device, partition, account, container, obj,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_67b020de","line":672,"in_reply_to":"9a80dd14_a18848c7","updated":"2015-03-12 04:13:59.000000000","message":"couldn\u0027t see the harm it letting it be None if the proxy doesn\u0027t send it?  I stopped short of stuffing it in get_name_and_placement?","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        \"\"\""},{"line_number":842,"context_line":"        device, partition, suffix_parts, policy \u003d \\"},{"line_number":843,"context_line":"            get_name_and_placement(request, 2, 3, True)"},{"line_number":844,"context_line":"        suffixes \u003d suffix_parts.split(\u0027-\u0027) if suffix_parts else []"},{"line_number":845,"context_line":"        try:"},{"line_number":846,"context_line":"            hashes \u003d self._diskfile_mgr.get_hashes(device, partition,"},{"line_number":847,"context_line":"                                                   suffixes, policy)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_78c70965","line":844,"updated":"2015-03-11 08:00:31.000000000","message":"this is actually my favorite cleanup in the whole patch :P","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        \"\"\""},{"line_number":842,"context_line":"        device, partition, suffix_parts, policy \u003d \\"},{"line_number":843,"context_line":"            get_name_and_placement(request, 2, 3, True)"},{"line_number":844,"context_line":"        suffixes \u003d suffix_parts.split(\u0027-\u0027) if suffix_parts else []"},{"line_number":845,"context_line":"        try:"},{"line_number":846,"context_line":"            hashes \u003d self._diskfile_mgr.get_hashes(device, partition,"},{"line_number":847,"context_line":"                                                   suffixes, policy)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_61449074","line":844,"in_reply_to":"9a80dd14_78c70965","updated":"2015-03-11 22:02:35.000000000","message":"yeah, that\u0027s been a subtle thing for sure, nice to see it made a little more obvious.  I\u0027d really like it if the verb was changed from REPLICATE to GET_SYNC_INFO or something that actually makes sense :)","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/obj/ssync_receiver.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08d81cf17c716f1e208e96292df252fa089d98a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        self.device, self.partition \u003d utils.split_path("},{"line_number":171,"context_line":"            urllib.unquote(self.request.path), 2, 2, False)"},{"line_number":172,"context_line":"        self.policy \u003d storage_policy.POLICIES.get_by_index("},{"line_number":173,"context_line":"            self.request.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":174,"context_line":"        if \u0027X-Backend-Ssync-Frag-Index\u0027 in self.request.headers:"},{"line_number":175,"context_line":"            self.frag_index \u003d int("},{"line_number":176,"context_line":"                self.request.headers[\u0027X-Backend-Ssync-Frag-Index\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_f8aa1984","line":173,"updated":"2015-03-11 08:00:31.000000000","message":"this gets fixed in acoles follow up patch [1] - which I should probably just squash into here.\n\n1. https://review.openstack.org/#/c/162696/","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        self.device, self.partition \u003d utils.split_path("},{"line_number":171,"context_line":"            urllib.unquote(self.request.path), 2, 2, False)"},{"line_number":172,"context_line":"        self.policy \u003d storage_policy.POLICIES.get_by_index("},{"line_number":173,"context_line":"            self.request.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":174,"context_line":"        if \u0027X-Backend-Ssync-Frag-Index\u0027 in self.request.headers:"},{"line_number":175,"context_line":"            self.frag_index \u003d int("},{"line_number":176,"context_line":"                self.request.headers[\u0027X-Backend-Ssync-Frag-Index\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_012af48f","line":173,"in_reply_to":"9a80dd14_f8aa1984","updated":"2015-03-11 22:02:35.000000000","message":"OK, will hold off looking at the other one then!","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}],"swift/obj/ssync_sender.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"399f289ff19f7d0ae9ce4eaf95c90154b0aeb1b4","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @property"},{"line_number":57,"context_line":"    def policy(self):"},{"line_number":58,"context_line":"        return POLICIES.get_by_index(self.job.get(\u0027policy_idx\u0027))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def __call__(self):"},{"line_number":61,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_cce4e80e","line":58,"updated":"2015-03-10 12:35:41.000000000","message":"Does the job have \u0027policy\u0027 instead of \u0027policy_idx\u0027?","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0187c1d866d91721683b562f0f1b8d79fd29b72","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @property"},{"line_number":57,"context_line":"    def policy(self):"},{"line_number":58,"context_line":"        return POLICIES.get_by_index(self.job.get(\u0027policy_idx\u0027))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def __call__(self):"},{"line_number":61,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_295f2477","line":58,"in_reply_to":"9a80dd14_cce4e80e","updated":"2015-03-10 17:20:06.000000000","message":"Well that sucked, yeah the tests all stubbed the jobs dict - it\u0027ll be nice to have working probe/func tests for ec, but I suppose I could check out these patches on my all-in-one that\u0027s *not* configured for EC and make sure there\u0027s at least no regressions.  Nice catch, Thanks.\n\nDone","commit_id":"01dccb1ef2094eb5638c9808d37ed11fb988a949"}],"swift/obj/updater.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d156ccccf932c030c4db21ec0e00acf349eeac42","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            async_pending \u003d os.path.join(device, asyncdir)"},{"line_number":154,"context_line":"            if not os.path.isdir(async_pending):"},{"line_number":155,"context_line":"                continue"},{"line_number":156,"context_line":"            if not asyncdir.startswith(ASYNCDIR_BASE):"},{"line_number":157,"context_line":"                # skip stuff like \"accounts\", \"containers\", etc."},{"line_number":158,"context_line":"                continue"},{"line_number":159,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a4121656","line":156,"updated":"2015-03-11 22:02:35.000000000","message":"I think this section my be my favorite clean up","commit_id":"cac33af9a28a971e0ac0ea59aca414b067411eaa"}]}
