)]}'
{"swift/obj/reconstructor.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"902bd2e20c72b3f9dd68c147820c52c252cac943","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            if fi \u003e\u003d len(part_nodes):"},{"line_number":944,"context_line":"                self.logger.warning("},{"line_number":945,"context_line":"                    \u0027Bad fragment index %r for suffixes %r under %s\u0027,"},{"line_number":946,"context_line":"                    fi, data_fi_to_suffixes[fi], part_path)"},{"line_number":947,"context_line":"                # TODO: maybe find a way to quarantine?"},{"line_number":948,"context_line":"                continue"},{"line_number":949,"context_line":"            nodes_sync_to \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_ea2acfe3","line":946,"updated":"2018-10-29 06:39:45.000000000","message":"Hmmm... I was thinking some info from actual policy the invalid frag stored and the expected policy but the actual one could be found by the part_path. then admin could find how the fragment encoded via the fragment header in the object, maybe?","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"76faf0dfcbe5ba83da2026cf44fedc9630b7e9c2","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            if fi \u003e\u003d len(part_nodes):"},{"line_number":944,"context_line":"                self.logger.warning("},{"line_number":945,"context_line":"                    \u0027Bad fragment index %r for suffixes %r under %s\u0027,"},{"line_number":946,"context_line":"                    fi, data_fi_to_suffixes[fi], part_path)"},{"line_number":947,"context_line":"                # TODO: maybe find a way to quarantine?"},{"line_number":948,"context_line":"                continue"},{"line_number":949,"context_line":"            nodes_sync_to \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_6b437398","line":946,"in_reply_to":"3f79a3b5_45e78611","updated":"2018-11-06 20:22:30.000000000","message":"Seems like this ought to be treated like we would negative indexes, or non-integer indexes. Currently, that means logging a warning about \"Unexpected file ...\" [1] and ignoring it.\n\nYes, it\u0027d probably be even *better* to quarantine things that look like they should be under our purview but don\u0027t make any sense -- but right now I just want to avoid having an error that trips the \"Exception in top-level reconstruction loop\" handler. That clearly harms durability; odds are good that there\u0027s data on disk the reconstructor doesn\u0027t get to because it bombed out.\n\nBesides, we\u0027ve got another problem: there may already be hashes.pkl files out there with bad fragment indexes written down. With that rolling-up of state, we don\u0027t necessarily descend to _hash_suffix_dir where we\u0027d actually have the broken frag in hand; we\u0027re left with just the suffix to log about.\n\nThere\u0027s a reason I left it as a Partial-Bug fix ;-)\n\n[1] https://github.com/openstack/swift/blob/2.19.0/swift/obj/diskfile.py#L937-L938","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"46b3e7c05246b672477f64efd89e6215d2c502e8","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            if fi \u003e\u003d len(part_nodes):"},{"line_number":944,"context_line":"                self.logger.warning("},{"line_number":945,"context_line":"                    \u0027Bad fragment index %r for suffixes %r under %s\u0027,"},{"line_number":946,"context_line":"                    fi, data_fi_to_suffixes[fi], part_path)"},{"line_number":947,"context_line":"                # TODO: maybe find a way to quarantine?"},{"line_number":948,"context_line":"                continue"},{"line_number":949,"context_line":"            nodes_sync_to \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_45e78611","line":946,"in_reply_to":"3f79a3b5_61aea8e5","updated":"2018-11-06 17:28:30.000000000","message":"Why only warning?  How is this ever going to get better without operator intervention?","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"72e89d97e44dc8c0e8f1b65e08a7ccc391f7adee","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            if fi \u003e\u003d len(part_nodes):"},{"line_number":944,"context_line":"                self.logger.warning("},{"line_number":945,"context_line":"                    \u0027Bad fragment index %r for suffixes %r under %s\u0027,"},{"line_number":946,"context_line":"                    fi, data_fi_to_suffixes[fi], part_path)"},{"line_number":947,"context_line":"                # TODO: maybe find a way to quarantine?"},{"line_number":948,"context_line":"                continue"},{"line_number":949,"context_line":"            nodes_sync_to \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_61aea8e5","line":946,"in_reply_to":"3f79a3b5_b7898c70","updated":"2018-10-31 17:04:45.000000000","message":"The auditor doesn\u0027t check that. It will open the file and read its content, no matter the frag index. (the file will get quarantined if the content is wrong, tho)\n\nMaybe a file with an invalid frag index wrt. the policy belongs in the \u0027unexpected\u0027 dict entry returned by get_ondisk_file() ? That would happen if as you suggest, validate_fragment_index raises a DiskFileError. \n\nIt will make little difference, as all unexpected files are just ignored, except for rsync tempfiles, which are removed if old enough.","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fc91f0c65184003ced23ab9333bf0d7de862d7cb","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            if fi \u003e\u003d len(part_nodes):"},{"line_number":944,"context_line":"                self.logger.warning("},{"line_number":945,"context_line":"                    \u0027Bad fragment index %r for suffixes %r under %s\u0027,"},{"line_number":946,"context_line":"                    fi, data_fi_to_suffixes[fi], part_path)"},{"line_number":947,"context_line":"                # TODO: maybe find a way to quarantine?"},{"line_number":948,"context_line":"                continue"},{"line_number":949,"context_line":"            nodes_sync_to \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b7898c70","line":946,"in_reply_to":"3f79a3b5_ea2acfe3","updated":"2018-10-30 17:39:20.000000000","message":"I\u0027m not sure the frag itself actually stores the policy... looks like it does store X-Object-Sysmeta-Ec-Frag-Index and X-Object-Sysmeta-Ec-Scheme, at least, but by this point we\u0027ve only got frag indexes and suffixes -- we\u0027d have to go digging through the filesystem to get to actual object data.\n\nMaybe we could quarantine over in BaseDiskFileManager._hash_suffix_dir ... validate_fragment_index seems like a reasonable spot? I think self.policy is just \u0027replication\u0027 or \u0027erasure_coding\u0027, though, and not an actual StoragePolicy object...\n\nAnyway, *here* I think this is the best we can reasonably do -- there are already hashes.pkl on disk with invalid frag indexes.\n\nI wonder if the auditor does anything to validate that the frag index in the file name matches X-Object-Sysmeta-Ec-Frag-Index ...","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"64c2230574a601b56bb608c919c57a2e424161be","unresolved":false,"context_lines":[{"line_number":949,"context_line":"            nodes_sync_to \u003d []"},{"line_number":950,"context_line":"            node_index \u003d fi"},{"line_number":951,"context_line":"            for n in range(policy.ec_duplication_factor):"},{"line_number":952,"context_line":"                nodes_sync_to.append(part_nodes[node_index])"},{"line_number":953,"context_line":"                node_index +\u003d policy.ec_n_unique_fragments"},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"            revert_job \u003d build_job("}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0e50b12b","line":952,"range":{"start_line":952,"start_character":37,"end_line":952,"end_character":59},"updated":"2018-10-01 19:17:04.000000000","message":"Without the patch, we\u0027d hit an IndexError here.","commit_id":"8fa57f116a0e912782ee4210ebad9fbf76b685ca"}]}
