)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c8d81a105cb5706c3db5f1ebaeb97cc94ece80b5","unresolved":false,"context_lines":[{"line_number":801,"context_line":"        return splitext(fname)[0], \u0027\u0027"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"    def yield_hashes(self, device, partition, policy,"},{"line_number":804,"context_line":"                     trailing_filter\u003d\u0027\u0027, suffixes\u003dNone):"},{"line_number":805,"context_line":"        \"\"\""},{"line_number":806,"context_line":"        Yields tuples of (full_path, hash_only, timestamp) for object"},{"line_number":807,"context_line":"        information stored for the given device, partition, and"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_2d176ca4","line":804,"updated":"2015-03-20 10:35:37.000000000","message":"bah - I can\u0027t even really know which implementation is being changed looking at the diff out of context - there\u0027s only the one yeild_hashes on the base/replicated DiskFileManager yeah?\n\nwhy is trailing_filter added in-front of suffixes?","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bf191130f5fb364c24aa49f9c987bd8d1ab19355","unresolved":false,"context_lines":[{"line_number":801,"context_line":"        return splitext(fname)[0], \u0027\u0027"},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"    def yield_hashes(self, device, partition, policy,"},{"line_number":804,"context_line":"                     trailing_filter\u003d\u0027\u0027, suffixes\u003dNone):"},{"line_number":805,"context_line":"        \"\"\""},{"line_number":806,"context_line":"        Yields tuples of (full_path, hash_only, timestamp) for object"},{"line_number":807,"context_line":"        information stored for the given device, partition, and"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_86e912e5","line":804,"in_reply_to":"9a80dd14_2d176ca4","updated":"2015-03-20 14:10:02.000000000","message":"I\u0027ve spoken with Paul about this, I think the only caller passing a trailing_filter is up in to reconstructor. I have lingering doubts about this method and won\u0027t be surprised if we end up needing an EC-manager-specific implementation - see my TODO at line 835","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"807c96436345f3cfd504f29c9d5f930efc4b033c","unresolved":false,"context_lines":[{"line_number":831,"context_line":"                for name in self.hash_cleanup_listdir("},{"line_number":832,"context_line":"                        object_path, self.reclaim_age):"},{"line_number":833,"context_line":"                    ts, fi \u003d self.fname_to_ts(name)"},{"line_number":834,"context_line":"                    if fi \u003d\u003d trailing_filter:"},{"line_number":835,"context_line":"                        # TODO: (acoles) check sanity of this when"},{"line_number":836,"context_line":"                        # reconstructor is done: does trailing filter include"},{"line_number":837,"context_line":"                        # the #? what about yielding ts and meta files when"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_b847dd1c","line":834,"updated":"2015-03-22 15:25:01.000000000","message":"I have this updated on the reconstructor branch - before addressing any of these TODO\u0027s or questions leta be sure to sync","commit_id":"947f45cb61e78757ea13b2f3c1c3030644e2568b"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"b74bd576158214730ed9fce3519d0a59564af1c8","unresolved":false,"context_lines":[{"line_number":2154,"context_line":"                (os.path.join(partition_path, suffix), suffix)"},{"line_number":2155,"context_line":"                for suffix in suffixes)"},{"line_number":2156,"context_line":"        for suffix_path, suffix in suffixes:"},{"line_number":2157,"context_line":"            for object_hash in self._listdir(suffix_path):"},{"line_number":2158,"context_line":"                object_path \u003d os.path.join(suffix_path, object_hash)"},{"line_number":2159,"context_line":"                try:"},{"line_number":2160,"context_line":"                    files \u003d self.hash_cleanup_listdir("}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_38572a04","line":2157,"updated":"2015-03-30 03:33:04.000000000","message":"From this line, there are some try-except for logger.debug messages. From trouble shooting point of view, it is better to use an original message in addition to or instead of the messages.\n\nhttp://paste.openstack.org/show/197379/","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f62207f46da42d998d75991c0413b0906df9a61","unresolved":false,"context_lines":[{"line_number":2154,"context_line":"                (os.path.join(partition_path, suffix), suffix)"},{"line_number":2155,"context_line":"                for suffix in suffixes)"},{"line_number":2156,"context_line":"        for suffix_path, suffix in suffixes:"},{"line_number":2157,"context_line":"            for object_hash in self._listdir(suffix_path):"},{"line_number":2158,"context_line":"                object_path \u003d os.path.join(suffix_path, object_hash)"},{"line_number":2159,"context_line":"                try:"},{"line_number":2160,"context_line":"                    files \u003d self.hash_cleanup_listdir("}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_a004187e","line":2157,"in_reply_to":"da9b358b_38572a04","updated":"2015-03-30 10:45:10.000000000","message":"Looks like Clay has done this. Thanks!","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"4bb3d53d17b290a33b4d47256ea91a23316e7c0f","unresolved":false,"context_lines":[{"line_number":2158,"context_line":"                object_path \u003d os.path.join(suffix_path, object_hash)"},{"line_number":2159,"context_line":"                try:"},{"line_number":2160,"context_line":"                    files \u003d self.hash_cleanup_listdir("},{"line_number":2161,"context_line":"                        object_path, self.reclaim_age)"},{"line_number":2162,"context_line":"                except AssertionError:"},{"line_number":2163,"context_line":"                    self.logger.debug(\u0027Invalid file set in %r\u0027 % ("},{"line_number":2164,"context_line":"                        object_path))"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_db65d8e1","line":2161,"updated":"2015-03-30 05:58:05.000000000","message":"Not sure, just might be a notification.\n\nhash_cleanup_listdir calls gather_ondisk_files when the hash dir doesn\u0027t consist of only .ts file. At that time, we would allow to call gather_ondisk_files twice on closest place so I wonder if we could try to get rid of the wasted behavior.\n\ne.g. \nIf hash_cleanup_listdir could return a (files,results) tuple, we could not need the following gather_ondisk_files call.\n\n\nAnyways, this is a code cleanup but not invalid behavior so it seems not significant blocker for landing.","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f62207f46da42d998d75991c0413b0906df9a61","unresolved":false,"context_lines":[{"line_number":2158,"context_line":"                object_path \u003d os.path.join(suffix_path, object_hash)"},{"line_number":2159,"context_line":"                try:"},{"line_number":2160,"context_line":"                    files \u003d self.hash_cleanup_listdir("},{"line_number":2161,"context_line":"                        object_path, self.reclaim_age)"},{"line_number":2162,"context_line":"                except AssertionError:"},{"line_number":2163,"context_line":"                    self.logger.debug(\u0027Invalid file set in %r\u0027 % ("},{"line_number":2164,"context_line":"                        object_path))"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_a02658b8","line":2161,"in_reply_to":"da9b358b_db65d8e1","updated":"2015-03-30 10:45:10.000000000","message":"Totally agree. I had to leave the call to hash_cleanup_listdir because it cleans up old files, but doesn\u0027t return the values i need, so call to gather_ondisk_files. And I forgot to go back and refactor to have a shared method.","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"4bb3d53d17b290a33b4d47256ea91a23316e7c0f","unresolved":false,"context_lines":[{"line_number":2173,"context_line":"                newest_valid_file \u003d (results.get(\u0027.meta\u0027)"},{"line_number":2174,"context_line":"                                     or results.get(\u0027.data\u0027)"},{"line_number":2175,"context_line":"                                     or results.get(\u0027.ts\u0027))"},{"line_number":2176,"context_line":"                if newest_valid_file:"},{"line_number":2177,"context_line":"                    try:"},{"line_number":2178,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2179,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_bb9fb45e","line":2176,"updated":"2015-03-30 05:58:05.000000000","message":"I wonder why we need the check for newest_valid_file.\n\ngather_ondisk_files should verify the context (\"results\" here) has the valid file set or not. If the hash dir doesn\u0027t have valid file set, it raises AssertionError in the above code.\n\nValid cases summaries from the code[1] are:\n\n 1. no .data, .meta, .ts and .durable exists\n 2. .data, .meta, .durable doesn\u0027t but .ts exists\n 3. .data and .durable (optionally .meta) exist but .ts doesn\u0027t\n 4. only .durable exists\n\nThis if condition seems to filter the 1 and 4 cases...\nAbsolutely, we should  ignore the case 1, but...I\u0027m not sure about the case4.\n\n1: https://github.com/openstack/swift/blob/feature/ec/swift/obj/diskfile.py#L2050-L2057","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f62207f46da42d998d75991c0413b0906df9a61","unresolved":false,"context_lines":[{"line_number":2173,"context_line":"                newest_valid_file \u003d (results.get(\u0027.meta\u0027)"},{"line_number":2174,"context_line":"                                     or results.get(\u0027.data\u0027)"},{"line_number":2175,"context_line":"                                     or results.get(\u0027.ts\u0027))"},{"line_number":2176,"context_line":"                if newest_valid_file:"},{"line_number":2177,"context_line":"                    try:"},{"line_number":2178,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2179,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_0094e488","line":2176,"in_reply_to":"da9b358b_bb9fb45e","updated":"2015-03-30 10:45:10.000000000","message":"The \u0027if newest_valid_file\u0027: checks for case 1.\n\nI\u0027m not sure when we\u0027d have only a .durable (case 4) and what we would want to do with it if we did. But I agree the ondisk contract allows it :/","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"4bb3d53d17b290a33b4d47256ea91a23316e7c0f","unresolved":false,"context_lines":[{"line_number":2176,"context_line":"                if newest_valid_file:"},{"line_number":2177,"context_line":"                    try:"},{"line_number":2178,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2179,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"},{"line_number":2180,"context_line":"                    except DiskFileError:"},{"line_number":2181,"context_line":"                        self.logger.debug("},{"line_number":2182,"context_line":"                            \u0027Invalid diskfile filename %r in %r\u0027 % ("}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_3bd164ce","line":2179,"updated":"2015-03-30 05:58:05.000000000","message":"From the above comment, we are trying to retrieve the timestamp instance from filename on the 2 and 3 cases. However I just realize parse_on_disk_filename seems to return DiskFileError only when the filename endswith .data because .ts and .meta doesn\u0027t go to validate_fragment_index.\n\nHence, maybe what we need  here is to validate also .data even if the newest timestamp .meta exists, IMHO.","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f62207f46da42d998d75991c0413b0906df9a61","unresolved":false,"context_lines":[{"line_number":2176,"context_line":"                if newest_valid_file:"},{"line_number":2177,"context_line":"                    try:"},{"line_number":2178,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2179,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"},{"line_number":2180,"context_line":"                    except DiskFileError:"},{"line_number":2181,"context_line":"                        self.logger.debug("},{"line_number":2182,"context_line":"                            \u0027Invalid diskfile filename %r in %r\u0027 % ("}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_20cfe880","line":2179,"in_reply_to":"da9b358b_3bd164ce","updated":"2015-03-30 10:45:10.000000000","message":"The .data filename will be validated during gather_ondisk_files here https://github.com/openstack/swift/blob/feature/ec/swift/obj/diskfile.py#L2004\n\nSo, results.get(\u0027.data\u0027) must be ok for us to reach this line.","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"333a106dbe2e0765cec8e9b0679df327dc3c3597","unresolved":false,"context_lines":[{"line_number":2158,"context_line":"                object_path \u003d os.path.join(suffix_path, object_hash)"},{"line_number":2159,"context_line":"                newest_valid_file \u003d None"},{"line_number":2160,"context_line":"                try:"},{"line_number":2161,"context_line":"                    files \u003d self.hash_cleanup_listdir("},{"line_number":2162,"context_line":"                        object_path, self.reclaim_age)"},{"line_number":2163,"context_line":"                    results \u003d self.gather_ondisk_files("},{"line_number":2164,"context_line":"                        files, frag_index\u003dfrag_index)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_061e3c0c","line":2161,"updated":"2015-03-30 11:55:58.000000000","message":"see kota\u0027s earlier comment - the call to hash_cleanup_listdir followed by gather_ondisk_files can be simplified, \u0026 i\u0027m working on it.\n\nRight now, hash_cleanup_listdir is called because it cleans out old files, gather_ondisk_files is called because it returns the valid file set.","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"51b2bb397d1c48b7387d836d93be65701eb6131d","unresolved":false,"context_lines":[{"line_number":2168,"context_line":"                    if newest_valid_file:"},{"line_number":2169,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2170,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"},{"line_number":2171,"context_line":"                        yield (object_path, object_hash, timestamp.internal)"},{"line_number":2172,"context_line":"                except AssertionError as err:"},{"line_number":2173,"context_line":"                    self.logger.debug(\u0027Invalid file set in %s (%s)\u0027 % ("},{"line_number":2174,"context_line":"                        object_path, err))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_e73fdb23","line":2171,"updated":"2015-03-30 08:41:31.000000000","message":"There is a \"break\" after the \"yield\" in the replicated yield_hashes method. I\u0027m wondering if we should use this here as well? There might be a newer file appear during the forloop, and thus it might yield more than one result?","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b6089c7a66624f19e828f612790e285f8070ec2","unresolved":false,"context_lines":[{"line_number":2168,"context_line":"                    if newest_valid_file:"},{"line_number":2169,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2170,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"},{"line_number":2171,"context_line":"                        yield (object_path, object_hash, timestamp.internal)"},{"line_number":2172,"context_line":"                except AssertionError as err:"},{"line_number":2173,"context_line":"                    self.logger.debug(\u0027Invalid file set in %s (%s)\u0027 % ("},{"line_number":2174,"context_line":"                        object_path, err))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_bd73234d","line":2171,"in_reply_to":"da9b358b_e213495b","updated":"2015-03-30 10:58:46.000000000","message":"Yes. The other implementation enters a for loop but always breaks after the first item is yielded, because that item is considered the newest valid file. Here, for EC, we can\u0027t yield the first because that might be a non-durable .data, but fortunately gather_ondisk_files has done all the work of figuring out what is the newest valid file.","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"c090ae82d6c152542780ca517cbbc85e698b6ca8","unresolved":false,"context_lines":[{"line_number":2168,"context_line":"                    if newest_valid_file:"},{"line_number":2169,"context_line":"                        timestamp \u003d self.parse_on_disk_filename("},{"line_number":2170,"context_line":"                            newest_valid_file)[\u0027timestamp\u0027]"},{"line_number":2171,"context_line":"                        yield (object_path, object_hash, timestamp.internal)"},{"line_number":2172,"context_line":"                except AssertionError as err:"},{"line_number":2173,"context_line":"                    self.logger.debug(\u0027Invalid file set in %s (%s)\u0027 % ("},{"line_number":2174,"context_line":"                        object_path, err))"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_e213495b","line":2171,"in_reply_to":"da9b358b_e73fdb23","updated":"2015-03-30 08:51:53.000000000","message":"Nevermind, the yield in the other method is not in the \"for object_hash in self._listdir(suffix_path):\" loop.","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"}],"swift/obj/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c8d81a105cb5706c3db5f1ebaeb97cc94ece80b5","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        try:"},{"line_number":489,"context_line":"            # for PUT. we dont need to supply a frag_index as we\u0027re"},{"line_number":490,"context_line":"            # creating the file and will update it when we write meta"},{"line_number":491,"context_line":"            # (we won\u0027t know it until we get the trailer anyways)"},{"line_number":492,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":493,"context_line":"                device, partition, account, container, obj,"},{"line_number":494,"context_line":"                policy\u003dpolicy, frag_index\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_ad50bc5e","line":491,"updated":"2015-03-20 10:35:37.000000000","message":"I don\u0027t see why this comment would be true - the node_index is known when the connection is made, why wouldn\u0027t it this information be in the headers?  I\u0027d rather either use the kwarg or not - and I think we have to on GET.","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bf191130f5fb364c24aa49f9c987bd8d1ab19355","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        try:"},{"line_number":489,"context_line":"            # for PUT. we dont need to supply a frag_index as we\u0027re"},{"line_number":490,"context_line":"            # creating the file and will update it when we write meta"},{"line_number":491,"context_line":"            # (we won\u0027t know it until we get the trailer anyways)"},{"line_number":492,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":493,"context_line":"                device, partition, account, container, obj,"},{"line_number":494,"context_line":"                policy\u003dpolicy, frag_index\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_86fe7204","line":491,"in_reply_to":"9a80dd14_ad50bc5e","updated":"2015-03-20 14:10:02.000000000","message":"I\u0027m also unsure about htis - see trello card https://trello.com/c/AaFXheDj/151-check-diskfile-handling-of-frag-index","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c8d81a105cb5706c3db5f1ebaeb97cc94ece80b5","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":674,"context_line":"                device, partition, account, container, obj,"},{"line_number":675,"context_line":"                policy\u003dpolicy, frag_index\u003dnode_index)"},{"line_number":676,"context_line":"        except DiskFileDeviceUnavailable:"},{"line_number":677,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":678,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_4dcf4029","line":675,"updated":"2015-03-20 10:35:37.000000000","message":"thinking about alternative diskfiles I think I\u0027d rather the kwarg to diskfile also be called node_index - that or change the header.","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"6ae86ab9bc488db2fce0baa985efef97743ba086","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        try:"},{"line_number":489,"context_line":"            # for PUT. we dont need to supply a frag_index as we\u0027re"},{"line_number":490,"context_line":"            # creating the file and will update it when we write meta"},{"line_number":491,"context_line":"            # (we won\u0027t know it until we get the trailer anyways)"},{"line_number":492,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":493,"context_line":"                device, partition, account, container, obj,"},{"line_number":494,"context_line":"                policy\u003dpolicy, frag_index\u003dNone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_ce773bd3","line":491,"updated":"2015-03-24 05:30:36.000000000","message":"This is a just memo to me, this comment is really important because intuitively we would want to open the diskfile with frag_index anytime but, for now here,it will be defined at the trailer so we won\u0027t know that. If we could determine the frag_index at the header, it might be better to simplify the code, IMHO.","commit_id":"947f45cb61e78757ea13b2f3c1c3030644e2568b"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"168e7c0c86d755bc9eeaaf882b623b55f1c1824f","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            # (we won\u0027t know it until we get the trailer anyways)"},{"line_number":492,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":493,"context_line":"                device, partition, account, container, obj,"},{"line_number":494,"context_line":"                policy\u003dpolicy, frag_index\u003dNone)"},{"line_number":495,"context_line":"        except DiskFileDeviceUnavailable:"},{"line_number":496,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":497,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_44ef08b1","line":494,"updated":"2015-03-20 18:30:25.000000000","message":"so as it turns out on PUT it\u0027s not super convenient to calculate the *real* node-index as we\u0027re connecting.\n\nIf the Putter is connecting to a primary node we *could* send down the node_index - but we don\u0027t bother.  The problem is when you get to a *handoff* node the Putter has a \"node_index\" - but it\u0027s not the same as the EC-Archive-Index is going to be.\n\nThe chunk_index map is filled in *after* all the Putter\u0027s are connected, and the backend_chunks are spit to to each putter based on the index assigned - and only after sending all the data we call into the storage_policy to get the trailing metadata which has the EC-Archive-Index.","commit_id":"947f45cb61e78757ea13b2f3c1c3030644e2568b"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"807c96436345f3cfd504f29c9d5f930efc4b033c","unresolved":false,"context_lines":[{"line_number":491,"context_line":"            # (we won\u0027t know it until we get the trailer anyways)"},{"line_number":492,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":493,"context_line":"                device, partition, account, container, obj,"},{"line_number":494,"context_line":"                policy\u003dpolicy, frag_index\u003dNone)"},{"line_number":495,"context_line":"        except DiskFileDeviceUnavailable:"},{"line_number":496,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":497,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_f8687589","line":494,"in_reply_to":"9a80dd14_44ef08b1","updated":"2015-03-22 15:25:01.000000000","message":"not sure whether you\u0027re trying to make a point different from the comment I have in there or just agreeing?","commit_id":"947f45cb61e78757ea13b2f3c1c3030644e2568b"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"baf311354ab231688080d1c42f5dfe43fce0eee2","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        keep_cache \u003d self.keep_cache_private or ("},{"line_number":669,"context_line":"            \u0027X-Auth-Token\u0027 not in request.headers and"},{"line_number":670,"context_line":"            \u0027X-Storage-Token\u0027 not in request.headers)"},{"line_number":671,"context_line":"        node_index \u003d request.headers.get(\u0027X-Backend-Node-Index\u0027)"},{"line_number":672,"context_line":"        try:"},{"line_number":673,"context_line":"            disk_file \u003d self.get_diskfile("},{"line_number":674,"context_line":"                device, partition, account, container, obj,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6ced46_77a1e1a8","line":671,"updated":"2015-03-23 11:51:32.000000000","message":"these can be \"fixed\" (headers consolidated) I think after we land the chain","commit_id":"947f45cb61e78757ea13b2f3c1c3030644e2568b"}],"swift/obj/ssync_sender.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c8d81a105cb5706c3db5f1ebaeb97cc94ece80b5","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            self.connection.putheader(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":129,"context_line":"                                      int(self.job[\u0027policy\u0027]))"},{"line_number":130,"context_line":"            self.connection.putheader(\u0027X-Backend-Ssync-Frag-Index\u0027,"},{"line_number":131,"context_line":"                                      self.node[\u0027index\u0027])"},{"line_number":132,"context_line":"            self.connection.endheaders()"},{"line_number":133,"context_line":"        with exceptions.MessageTimeout("},{"line_number":134,"context_line":"                self.daemon.node_timeout, \u0027connect receive\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_6d45e46d","line":131,"updated":"2015-03-20 10:35:37.000000000","message":"Don\u0027t we already have X-Backend-Nodex-Index - what\u0027s the difference?","commit_id":"c672f931ecaf083b51bb0a5aed6c86e99c6445dd"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"4bb3d53d17b290a33b4d47256ea91a23316e7c0f","unresolved":false,"context_lines":[{"line_number":1007,"context_line":"            },"},{"line_number":1008,"context_line":"        }"},{"line_number":1009,"context_line":"        expected \u003d {"},{"line_number":1010,"context_line":"            \u00279373a92d072897b136b3fc06595b4abc\u0027: ts2,"},{"line_number":1011,"context_line":"            \u00279373a92d072897b136b3fc06595b0456\u0027: ts3,"},{"line_number":1012,"context_line":"            \u00279373a92d072897b136b3fc06595b7456\u0027: ts2,"},{"line_number":1013,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_0e465c23","line":1010,"updated":"2015-03-30 05:58:05.000000000","message":"I guess, this is doubtful on EC because if .meta later than .ts found, it will ignore on EC [1].\n\n1: https://github.com/openstack/swift/blob/feature/ec/swift/obj/diskfile.py#L2016-L2024","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8f62207f46da42d998d75991c0413b0906df9a61","unresolved":false,"context_lines":[{"line_number":1007,"context_line":"            },"},{"line_number":1008,"context_line":"        }"},{"line_number":1009,"context_line":"        expected \u003d {"},{"line_number":1010,"context_line":"            \u00279373a92d072897b136b3fc06595b4abc\u0027: ts2,"},{"line_number":1011,"context_line":"            \u00279373a92d072897b136b3fc06595b0456\u0027: ts3,"},{"line_number":1012,"context_line":"            \u00279373a92d072897b136b3fc06595b7456\u0027: ts2,"},{"line_number":1013,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":13,"id":"da9b358b_00a18494","line":1010,"in_reply_to":"da9b358b_0e465c23","updated":"2015-03-30 10:45:10.000000000","message":"Yes, see comment line 1419","commit_id":"17a36e1e967384977ba0fc24c670f05e91b21222"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"51b2bb397d1c48b7387d836d93be65701eb6131d","unresolved":false,"context_lines":[{"line_number":726,"context_line":"                    POLICIES[0])"},{"line_number":727,"context_line":"            except DiskFileNotExist as err:"},{"line_number":728,"context_line":"                exc \u003d err"},{"line_number":729,"context_line":"            self.assertEqual(str(exc), \u0027\u0027)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"    def test_get_diskfile_from_hash_bad_meta_name(self):"},{"line_number":732,"context_line":"        self.df_mgr.get_dev_path \u003d mock.MagicMock(return_value\u003d\u0027/srv/dev/\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_87c12f31","line":729,"updated":"2015-03-30 08:41:31.000000000","message":"Personally I would prefer something like this instead this try..except block (same for the following tests):\n\n with self.assertRaises(DiskFileNotExist) as cm:\n     self.df_mgr.get_diskfile_from_hash(\n         \u0027dev\u0027, \u00279\u0027, \u00279a7175077c01a23ade5956b8a2bba900\u0027, POLICIES[0])\n self.assertEqual(str(cm.exception), \u0027\u0027)\n\nIt\u0027s not a blocker though, thus not downvoting here.","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b6089c7a66624f19e828f612790e285f8070ec2","unresolved":false,"context_lines":[{"line_number":726,"context_line":"                    POLICIES[0])"},{"line_number":727,"context_line":"            except DiskFileNotExist as err:"},{"line_number":728,"context_line":"                exc \u003d err"},{"line_number":729,"context_line":"            self.assertEqual(str(exc), \u0027\u0027)"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"    def test_get_diskfile_from_hash_bad_meta_name(self):"},{"line_number":732,"context_line":"        self.df_mgr.get_dev_path \u003d mock.MagicMock(return_value\u003d\u0027/srv/dev/\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_a031b80d","line":729,"in_reply_to":"da9b358b_87c12f31","updated":"2015-03-30 10:58:46.000000000","message":"Your way *is* nicer but [1] says the context manager is new for 2.7. Also, these tests have just been relocated w.r.t. master so I\u0027d prefer not to change them here.","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"60d86ccc10b4885eed24a93136785c6e79711e0b","unresolved":false,"context_lines":[{"line_number":1417,"context_line":"        }"},{"line_number":1418,"context_line":"        expected \u003d {"},{"line_number":1419,"context_line":"            # TODO: differs from repl DiskFileManager which *will*"},{"line_number":1420,"context_line":"            # return meta timestamp when only meta and ts on disk"},{"line_number":1421,"context_line":"            \u00279373a92d072897b136b3fc06595b4abc\u0027: ts1,"},{"line_number":1422,"context_line":"            \u00279373a92d072897b136b3fc06595b0456\u0027: ts3,"},{"line_number":1423,"context_line":"            \u00279373a92d072897b136b3fc06595b7456\u0027: ts2,"}],"source_content_type":"text/x-python","patch_set":14,"id":"da9b358b_6644e873","line":1420,"updated":"2015-03-30 12:20:27.000000000","message":"+1, great TODO!","commit_id":"1936873d860600edbc5d98dc210f2b258e50b8ee"}]}
