)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"4fdd058c2d3c1524f439e8dc5e27003a7d492658","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            if afile.endswith(\u0027.data\u0027):"},{"line_number":339,"context_line":"                data_file \u003d join(datadir, afile)"},{"line_number":340,"context_line":"                break"},{"line_number":341,"context_line":"    assert ((data_file is None and meta_file is None and ts_file is None)"},{"line_number":342,"context_line":"            or (ts_file is not None and data_file is None"},{"line_number":343,"context_line":"                and meta_file is None)"},{"line_number":344,"context_line":"            or (data_file is not None and ts_file is None)), \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATH%2F%2FR4Q%3D","line":341,"updated":"2013-10-18 15:14:40.000000000","message":"Is there precedent for asserting on \"woah, buddy!\" conditions in Swift backend daemons?  (Or is there something that catches whatever assert does which keeps the daemon from exiting?)\n\nIt seems a shame that one bad apple data dir could halt the audit loop (I didn\u0027t actually set that situation up--I\u0027m just assuming that if one of these asserts fails, the process will exit).\n\nI\u0027d rather it log an error and do its best to audit all the rest of the datadirs.","commit_id":"69659a50cbcf3674f37fac3c18a427e1a367e37d"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"c1e5dee01376158ff36c9dfdbab395162c36a491","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            if afile.endswith(\u0027.data\u0027):"},{"line_number":339,"context_line":"                data_file \u003d join(datadir, afile)"},{"line_number":340,"context_line":"                break"},{"line_number":341,"context_line":"    assert ((data_file is None and meta_file is None and ts_file is None)"},{"line_number":342,"context_line":"            or (ts_file is not None and data_file is None"},{"line_number":343,"context_line":"                and meta_file is None)"},{"line_number":344,"context_line":"            or (data_file is not None and ts_file is None)), \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAATH%2F%2FRgE%3D","line":341,"in_reply_to":"AAAATH%2F%2FR4Q%3D","updated":"2013-10-18 16:00:44.000000000","message":"This is assertion is about the logic above.  It is there to ensure that potential changes to lines 327 - 340 don\u0027t break the contract.\n\nThese asserts came with https://review.openstack.org/44165","commit_id":"69659a50cbcf3674f37fac3c18a427e1a367e37d"}],"test/unit/obj/test_auditor.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e66270e442d54b8fb4b4a8c509e9e2c26c9f08b3","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        def mock_get_and_verify_size(*args, **kwargs):"},{"line_number":249,"context_line":"            # TODO(portante) Was not able to figure out how to mock out the"},{"line_number":250,"context_line":"            # builtin open() for the auditor modules, so we just make the"},{"line_number":251,"context_line":"            # IOError come from the next object method called."},{"line_number":252,"context_line":"            ioerr \u003d IOError()"},{"line_number":253,"context_line":"            ioerr.errno \u003d errno.EPERM"},{"line_number":254,"context_line":"            raise ioerr"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAASn%2F%2FJcc%3D","line":251,"updated":"2013-09-11 06:34:08.000000000","message":"mock mentions \"builtins.open\" explicitly\n\nhttp://docs.python.org/3.4/library/unittest.mock-examples.html#patch-decorators\n\nor do it manually:\n\n    In [6]: swift.obj.auditor.__builtins__[\u0027open\u0027]\n    Out[6]: \u003cfunction open\u003e","commit_id":"4389006eff348cc13af5adc5798d9bdb723d351a"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"89edea2210c8d402c33b0c3d475f4aa9a0f0262d","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        def mock_get_and_verify_size(*args, **kwargs):"},{"line_number":249,"context_line":"            # TODO(portante) Was not able to figure out how to mock out the"},{"line_number":250,"context_line":"            # builtin open() for the auditor modules, so we just make the"},{"line_number":251,"context_line":"            # IOError come from the next object method called."},{"line_number":252,"context_line":"            ioerr \u003d IOError()"},{"line_number":253,"context_line":"            ioerr.errno \u003d errno.EPERM"},{"line_number":254,"context_line":"            raise ioerr"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAASn%2F%2FHZ8%3D","line":251,"in_reply_to":"AAAASn%2F%2FJcc%3D","updated":"2013-09-11 19:27:18.000000000","message":"I could not get that to work, for some reason, but may have flubbed something. I\u0027ll retry.","commit_id":"4389006eff348cc13af5adc5798d9bdb723d351a"}]}
