)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f5cda69db488b8457051a3212e8bf556eeafcbfd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1874a8ac_c1f25dcd","updated":"2024-02-05 06:23:29.000000000","message":"I like it. I like that we\u0027re using merge_shards to check as that\u0027s code we rely on. I can\u0027t seem to think of a way it could slip through that. Will think on it some more tonight. And give a finaly vote (or even squash) in the morning.","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c78779d7ee59d29bd4ecc4a4084382e3a18df760","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"08d96dde_0cab813b","updated":"2024-02-02 19:26:03.000000000","message":"One little quibble in unit tests, but if it means we could finally land the parent patch, I\u0027ll take it!","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"cebe98545a044275fa06874b725142a7e3f65758","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a554429b_d73163f7","updated":"2024-02-06 03:47:04.000000000","message":"Yeah ok this is great. I\u0027m going to squash this down in the parent patch! Awesome work Al!","commit_id":"3cf0e1cca58f14bfce0c3ef74cafd73f841c5e1f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"10b6eb4cb259f02a35ebdbb1be9ffad0a1b0e3d6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c9f7bb59_fd1e2387","updated":"2024-02-06 05:37:14.000000000","message":"sqaushed this down into the parent","commit_id":"3cf0e1cca58f14bfce0c3ef74cafd73f841c5e1f"}],"swift/container/replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c78779d7ee59d29bd4ecc4a4084382e3a18df760","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    to_merge \u003d []"},{"line_number":51,"context_line":"    for shard in shards:"},{"line_number":52,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d own_sr.name and not shard[\u0027epoch\u0027]:"},{"line_number":53,"context_line":"            shard_copy \u003d dict(shard)"},{"line_number":54,"context_line":"            new_content \u003d merge_shards(shard_copy, dict(own_sr))"},{"line_number":55,"context_line":"            if new_content and shard_copy[\u0027epoch\u0027] is None:"},{"line_number":56,"context_line":"                logger.warning("}],"source_content_type":"text/x-python","patch_set":1,"id":"9f96802d_75a4470d","line":53,"updated":"2024-02-02 19:26:03.000000000","message":"Right: don\u0027t want to modify it yet. I don\u0027t _think_ it\u0027d cause any harm as far as what (if anything) gets written to the DB -- I\u0027m pretty sure we maintain an invariant such that if you\n```\nresult1 \u003d merge_shards(remote, local)\nremote_copy \u003d dict(remote)\nresult2 \u003d merge_shards(remote_copy, local)\n```\nwe know\n```\nresult1 \u003d\u003d result2\nremote \u003d\u003d remote_copy\n```\nright? But it\u0027s certainly better this way for the sake of the logging.","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c78779d7ee59d29bd4ecc4a4084382e3a18df760","unresolved":true,"context_lines":[{"line_number":51,"context_line":"    for shard in shards:"},{"line_number":52,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d own_sr.name and not shard[\u0027epoch\u0027]:"},{"line_number":53,"context_line":"            shard_copy \u003d dict(shard)"},{"line_number":54,"context_line":"            new_content \u003d merge_shards(shard_copy, dict(own_sr))"},{"line_number":55,"context_line":"            if new_content and shard_copy[\u0027epoch\u0027] is None:"},{"line_number":56,"context_line":"                logger.warning("},{"line_number":57,"context_line":"                    \u0027Ignoring remote osr w/o epoch, own_sr: %r, remote_sr: %r,\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"0619bc3f_d71e0563","line":54,"range":{"start_line":54,"start_character":26,"end_line":54,"end_character":38},"updated":"2024-02-02 19:26:03.000000000","message":"It\u0027s a little weird to me that we\u0027ll merge twice: once here, then again in `merge_shard_ranges`.\n\nNot that I _liked_ plumbing a logger into `merge_shards` in https://paste.opendev.org/show/baqD3bolWr4Wu41UIZnA/ -- so maybe this is least-bad.","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f5cda69db488b8457051a3212e8bf556eeafcbfd","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        if shard[\u0027name\u0027] \u003d\u003d own_sr.name and not shard[\u0027epoch\u0027]:"},{"line_number":53,"context_line":"            shard_copy \u003d dict(shard)"},{"line_number":54,"context_line":"            new_content \u003d merge_shards(shard_copy, dict(own_sr))"},{"line_number":55,"context_line":"            if new_content and shard_copy[\u0027epoch\u0027] is None:"},{"line_number":56,"context_line":"                logger.warning("},{"line_number":57,"context_line":"                    \u0027Ignoring remote osr w/o epoch, own_sr: %r, remote_sr: %r,\u0027"},{"line_number":58,"context_line":"                    \u0027 source: %s\u0027, dict(own_sr), shard, source)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2b8d046a_ba1c2c84","line":55,"updated":"2024-02-05 06:23:29.000000000","message":"Yeah ok, so using merge_shards to artifically merge the 2 and basically audit the result before we call it and write to disk later. And this only happens twice on the false-positives. Replicas that are yet to \"shard\" so have no epoch set. As they should merge fine, and the epoch will remain set.\n\nI did have a paste linked in the ticket downstream that did a timestamp compare trick.. but I like this approach more because it actually just does a preflight merge check and audits it to make sure false positives pass.\n\nOK so the replica has an older OSR so it could come back as new_content \u003d\u003d False and therefore go on and me merged so no logged message.\nJust trying to think of a way a new OSR could come out with now_content \u003d\u003d False.. and still still have an epoch of None. If it has a later state_timestamp the it\u0027ll get new_contented. Yup newer meta_timestamp, yup gets new_contented. And new timestamp too.. OK. Think this work.","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"}],"test/unit/container/test_replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c78779d7ee59d29bd4ecc4a4084382e3a18df760","unresolved":true,"context_lines":[{"line_number":1487,"context_line":"            self.assertEqual(exp_osr, actual_osr)"},{"line_number":1488,"context_line":"            lines \u003d daemon.logger.get_lines_for_level(\u0027warning\u0027)"},{"line_number":1489,"context_line":"            if exp_warning:"},{"line_number":1490,"context_line":"                self.assertEqual(len(lines), 1)"},{"line_number":1491,"context_line":"                self.assertIn(\"Ignoring remote osr w/o epoch\", lines[0])"},{"line_number":1492,"context_line":"                self.assertIn(\"own_sr: \", lines[0])"},{"line_number":1493,"context_line":"                self.assertIn(\"\u0027epoch\u0027: \u0027%s\u0027\" % local_osr.epoch.normal,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dd4266a0_5aa6916e","line":1490,"updated":"2024-02-02 19:26:03.000000000","message":"Why drop the `, lines`? I like seeing `lines` on failure here!","commit_id":"00c8003a0b509fc8819a0a6eb79b55ee530371df"}]}
