)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b230a47e3efe79b0181f2670e12072453bc8d253","unresolved":false,"context_lines":[{"line_number":11,"context_line":"ring dictionary in the file indicating the byteorder used to generate"},{"line_number":12,"context_line":"the file, and then byteswap if necessary when deserializing the file."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch only allows newly created ring files to be byteoder"},{"line_number":15,"context_line":"agnostic. Previously generated ring files will still fail on different"},{"line_number":16,"context_line":"endian architectures, and will need to be regenerated with this patch."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I23b5e0a8082b30ca257aeb1fab03ab74e6f0b2d4"},{"line_number":19,"context_line":"Closes-Bug: #1639980"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5a74a57a_a5501360","line":16,"range":{"start_line":14,"start_character":0,"end_line":16,"end_character":70},"updated":"2016-11-30 04:52:04.000000000","message":"Thanks a lot! This is worth information to know what fixed with this patch.","commit_id":"1ec6e2bb0aaaf0c34bf5a292703af18843521366"}],"swift/common/ring/ring.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"71f49e4cdf86612ab850addbc06421922bb3dcac","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        byteswap \u003d False"},{"line_number":75,"context_line":"        if \u0027byteorder\u0027 in ring_dict and \\"},{"line_number":76,"context_line":"           ring_dict[\u0027byteorder\u0027] !\u003d sys.byteorder:"},{"line_number":77,"context_line":"                byteswap \u003d True"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        partition_count \u003d 1 \u003c\u003c (32 - ring_dict[\u0027part_shift\u0027])"},{"line_number":80,"context_line":"        for x in range(ring_dict[\u0027replica_count\u0027]):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_1fe1ccfe","line":77,"updated":"2016-11-09 00:27:24.000000000","message":"nit: could be rewritten as\n\n byteswap \u003d (ring_dict.get(\u0027byteorder\u0027, sys.byteorder) !\u003d sys.byteorder)\n\nMaybe more readable? Or I just tend to minimize line count... might be worth letting other reviewers chime in.","commit_id":"b3c5b9a24b121252fb51e179096df86f8d76321e"},{"author":{"_account_id":23047,"name":"Drew Balfour","email":"andrew.balfour@oracle.com","username":"abalfour"},"change_message_id":"239e3af92d33994bdf606cef5900b08632a8d39b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        byteswap \u003d False"},{"line_number":75,"context_line":"        if \u0027byteorder\u0027 in ring_dict and \\"},{"line_number":76,"context_line":"           ring_dict[\u0027byteorder\u0027] !\u003d sys.byteorder:"},{"line_number":77,"context_line":"                byteswap \u003d True"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        partition_count \u003d 1 \u003c\u003c (32 - ring_dict[\u0027part_shift\u0027])"},{"line_number":80,"context_line":"        for x in range(ring_dict[\u0027replica_count\u0027]):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_a10ee238","line":77,"in_reply_to":"9a629dbe_1fe1ccfe","updated":"2016-11-09 17:58:10.000000000","message":"Sure, I prefer that too. I wasn\u0027t sure if the general style was elegant, compact code or step-by-step easy code.","commit_id":"b3c5b9a24b121252fb51e179096df86f8d76321e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"71f49e4cdf86612ab850addbc06421922bb3dcac","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # than the local one, or if the values in the ring file are invalid"},{"line_number":84,"context_line":"            # and nonsensical. The latter allows us to probably detect"},{"line_number":85,"context_line":"            # byteswapped data from files generated before the \u0027byteorder\u0027"},{"line_number":86,"context_line":"            # field was added."},{"line_number":87,"context_line":"            if byteswap or (max(part2dev) \u003e len(ring_dict[\u0027devs\u0027]) and"},{"line_number":88,"context_line":"                            max(part2dev) \u003d\u003d 256):"},{"line_number":89,"context_line":"                part2dev.byteswap()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_5fcd045c","line":86,"updated":"2016-11-09 00:27:24.000000000","message":"I understand why we kinda want this heuristic, but I\u0027m a little nervous that there\u0027s a (very slim) chance that we load the part2dev array for the first replica (not swapping bytes), then load part2dev for the second replica and *do* swap bytes.\n\nIs it so bad if the resolution to the bug is \"if you are affected, you will need to regenerate rings on an upgraded node\"? The check for \u0027byteorder\u0027 in ring_dict should already ensure we don\u0027t break functioning clusters, right?","commit_id":"b3c5b9a24b121252fb51e179096df86f8d76321e"},{"author":{"_account_id":23047,"name":"Drew Balfour","email":"andrew.balfour@oracle.com","username":"abalfour"},"change_message_id":"239e3af92d33994bdf606cef5900b08632a8d39b","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            # than the local one, or if the values in the ring file are invalid"},{"line_number":84,"context_line":"            # and nonsensical. The latter allows us to probably detect"},{"line_number":85,"context_line":"            # byteswapped data from files generated before the \u0027byteorder\u0027"},{"line_number":86,"context_line":"            # field was added."},{"line_number":87,"context_line":"            if byteswap or (max(part2dev) \u003e len(ring_dict[\u0027devs\u0027]) and"},{"line_number":88,"context_line":"                            max(part2dev) \u003d\u003d 256):"},{"line_number":89,"context_line":"                part2dev.byteswap()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_5cf16900","line":86,"in_reply_to":"9a629dbe_5fcd045c","updated":"2016-11-09 17:58:10.000000000","message":"In _theory_ it shouldn\u0027t happen unless the data in the blob is already garbage. If the maximal index value in the blob is larger than the target array it indexes into, you\u0027re going to have a bad day. I was on the fence about adding this, and I put it in because I couldn\u0027t think of a scenario where it would make things worse, since they\u0027d already be broken even if we didn\u0027t do the byte swap.\n\nHowever I\u0027ll defer to people who actually know the code, and I\u0027ll take it out if that\u0027s the consensus.","commit_id":"b3c5b9a24b121252fb51e179096df86f8d76321e"}],"test/unit/common/middleware/test_recon.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b230a47e3efe79b0181f2670e12072453bc8d253","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    def test_get_ring_md5(self):"},{"line_number":315,"context_line":"        # We should only see configured and present rings, so to handle the"},{"line_number":316,"context_line":"        # \"normal\" case just patch the policies to match the existing rings."},{"line_number":317,"context_line":"        expt_out \u003d {\u0027little\u0027: {\u0027%s/account.ring.gz\u0027 % self.tempdir:"},{"line_number":318,"context_line":"                               \u0027672c6c50dfcb77e04f5a2124aef87596\u0027,"},{"line_number":319,"context_line":"                               \u0027%s/container.ring.gz\u0027 % self.tempdir:"},{"line_number":320,"context_line":"                               \u00274c4392f8bf816596990ca7cd4d4b6e50\u0027,"},{"line_number":321,"context_line":"                               \u0027%s/object.ring.gz\u0027 % self.tempdir:"},{"line_number":322,"context_line":"                               \u0027a34178f7399706e41395eb3ac8b2c4f3\u0027,"},{"line_number":323,"context_line":"                               \u0027%s/object-1.ring.gz\u0027 % self.tempdir:"},{"line_number":324,"context_line":"                               \u0027cd54c473676ce5e3103e68f0e9f2326d\u0027,"},{"line_number":325,"context_line":"                               \u0027%s/object-2.ring.gz\u0027 % self.tempdir:"},{"line_number":326,"context_line":"                               \u00278783ec76f29bbcfd3f51acc63b2fc337\u0027},"},{"line_number":327,"context_line":"                    \u0027big\u0027: {\u0027%s/account.ring.gz\u0027 % self.tempdir:"},{"line_number":328,"context_line":"                            \u002770d2dde8144c09e5b42858e0fa17ab7e\u0027,"},{"line_number":329,"context_line":"                            \u0027%s/container.ring.gz\u0027 % self.tempdir:"},{"line_number":330,"context_line":"                            \u00270bd14f4327cbea88bde7ab7850d4d77d\u0027,"},{"line_number":331,"context_line":"                            \u0027%s/object.ring.gz\u0027 % self.tempdir:"},{"line_number":332,"context_line":"                            \u00272d17555687af36fd8c7ee5b0c492c582\u0027,"},{"line_number":333,"context_line":"                            \u0027%s/object-1.ring.gz\u0027 % self.tempdir:"},{"line_number":334,"context_line":"                            \u0027bc1145d31771d7957d939077fe40e2e8\u0027,"},{"line_number":335,"context_line":"                            \u0027%s/object-2.ring.gz\u0027 % self.tempdir:"},{"line_number":336,"context_line":"                            \u0027cd95a01ae1ab158f2e9e4c207aeb1769\u0027}}"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        # We need to instantiate app after overriding the configured policies."},{"line_number":339,"context_line":"        # object-{1,2}.ring.gz should both appear as they are present on disk"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a74a57a_8501573c","line":336,"range":{"start_line":317,"start_character":0,"end_line":336,"end_character":64},"updated":"2016-11-30 04:52:04.000000000","message":"so this means, we can find the endianess difference via comparing md5sum with ring-building machine, right?\n\nIt\u0027s good operational info to add into docs if someone saw the bug this patch attempts to fix.","commit_id":"1ec6e2bb0aaaf0c34bf5a292703af18843521366"}],"test/unit/common/ring/test_ring.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab82d0340ee0bc7987f32ce0b7651881ca2bf163","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                30)"},{"line_number":129,"context_line":"            rds.save(ring_fname)"},{"line_number":130,"context_line":"        finally:"},{"line_number":131,"context_line":"            sys.byteorder \u003d saved_byteorder"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        rd1 \u003d ring.RingData(data,"},{"line_number":134,"context_line":"                            [{\u0027id\u0027: 0, \u0027zone\u0027: 0}, {\u0027id\u0027: 1, \u0027zone\u0027: 1}],"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_d86f04fa","line":131,"updated":"2016-11-11 00:50:35.000000000","message":"Maybe worth doing something like\n\n with mock.patch.object(sys, \u0027byteorder\u0027,\n                        \u0027big\u0027 if sys.byteorder \u003d\u003d \u0027little\u0027 else \u0027little\u0027):\n\n?","commit_id":"5f5e68985b1886328927872bfe74759f84645d78"},{"author":{"_account_id":23047,"name":"Drew Balfour","email":"andrew.balfour@oracle.com","username":"abalfour"},"change_message_id":"9432bfff6d35d4a8441f162da6b8888f7bf88173","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                30)"},{"line_number":129,"context_line":"            rds.save(ring_fname)"},{"line_number":130,"context_line":"        finally:"},{"line_number":131,"context_line":"            sys.byteorder \u003d saved_byteorder"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        rd1 \u003d ring.RingData(data,"},{"line_number":134,"context_line":"                            [{\u0027id\u0027: 0, \u0027zone\u0027: 0}, {\u0027id\u0027: 1, \u0027zone\u0027: 1}],"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_a4b30697","line":131,"in_reply_to":"9a629dbe_d86f04fa","updated":"2016-11-11 07:02:59.000000000","message":"Sure. I wasn\u0027t sure how to get mock to patch a constant like that, so thanks.","commit_id":"5f5e68985b1886328927872bfe74759f84645d78"}]}
