)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add an option for the swift-manage-shard-ranges repair tool to ignore overlaps"},{"line_number":10,"context_line":"where the overlapping shards appear to be recently created, since this may"},{"line_number":11,"context_line":" indicate that they are shards of the parent with which they overlap."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib82219a506732303a1157c2c9e1c452b4a56061b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5be1d23c_2e80442a","line":11,"updated":"2022-08-15 11:36:24.000000000","message":"please wrap commit message at 80 columns :)","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a963767f0263455deeeadf8adcc178ba49bf5cb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add an option for the swift-manage-shard-ranges repair tool to ignore overlaps"},{"line_number":10,"context_line":"where the overlapping shards appear to be recently created, since this may"},{"line_number":11,"context_line":" indicate that they are shards of the parent with which they overlap."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib82219a506732303a1157c2c9e1c452b4a56061b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d63f8364_ce9575c2","line":11,"in_reply_to":"5be1d23c_2e80442a","updated":"2022-08-16 06:25:08.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":9,"context_line":"Add an option for the swift-manage-shard-ranges repair tool to ignore"},{"line_number":10,"context_line":" overlaps where the overlapping shards appear to be recently created,"},{"line_number":11,"context_line":" since this may indicate that they are shards of the parent with"},{"line_number":12,"context_line":"which they overlap."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ib82219a506732303a1157c2c9e1c452b4a56061b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f7a414f_f2fdf992","line":12,"updated":"2022-08-18 14:29:21.000000000","message":"I think it can be helpful when the time comes to update the changelog if, when adding a new config or CLI option, we specify it in the commit message, along with the default.\n\n  The new option is --min-shard-age with a default of 14400 seconds.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Add an option for the swift-manage-shard-ranges repair tool to ignore"},{"line_number":10,"context_line":" overlaps where the overlapping shards appear to be recently created,"},{"line_number":11,"context_line":" since this may indicate that they are shards of the parent with"},{"line_number":12,"context_line":"which they overlap."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ib82219a506732303a1157c2c9e1c452b4a56061b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"caaa0b90_2b8b6aa8","line":12,"in_reply_to":"9f7a414f_f2fdf992","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6ee7ee93_c5cd5b30","updated":"2022-08-12 17:09:35.000000000","message":"Great start.","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"599c46c2628e49181bc47a63bbea92deeb990c35","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"78309ffb_cc3d7b0a","updated":"2022-08-12 00:18:57.000000000","message":"In this MR, \u0027--recent-hrs-limit\u0027 will cover both subcommand repair and analyze. If we are good with this, then I need add more unit tests for analyze.","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e2b846cec3d4cdad2811b188f757de938c5457c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6d924acf_dbf7be1c","updated":"2022-08-12 16:52:31.000000000","message":"just a glance","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"74c9f4fc_8e0f0866","updated":"2022-08-13 03:31:48.000000000","message":"thanks!","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2ca7baa5_f76635e9","updated":"2022-08-15 11:36:24.000000000","message":"I realised on this review that we don\u0027t know if the \"too young\" shards will be in the acceptor path or in the donors, so a bit more work still needed.","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a963767f0263455deeeadf8adcc178ba49bf5cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f5c4ad0e_b7736a1f","updated":"2022-08-16 06:25:08.000000000","message":"Thanks for reviewing this MR!","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f2a6c7ade7320a08a980890998a7ea2c846de9e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3af7b970_9a52b5f6","updated":"2022-08-15 05:31:44.000000000","message":"The centos7 probe test failures are from a recent Zuul change that should be resolved -- but the failures we see on centos8 are real.","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"93c3a5c3_384c6c95","updated":"2022-08-18 14:29:21.000000000","message":"This is looking good, just minor comments in tests.\n\nI tried this out on my SAIO, after deliberately creating overlaps, and it worked nicely:\n\n  vagrant@saio:~/swift$ swift-manage-shard-ranges /srv/node1/sdb1/containers/944/771/ec2df0db871ba1ec45f20afc54935771/ec2df0db871ba1ec45f20afc54935771.db repair -n --min-shard-age 1000\nLoaded db broker for AUTH_test/junk\n3 overlapping donor shards ignored due to minimum age limit\nFound one complete sequence of 3 shard ranges and no overlapping shard ranges.\nNo repairs necessary.\n\n  vagrant@saio:~/swift$ swift-manage-shard-ranges /srv/node1/sdb1/containers/944/771/ec2df0db871ba1ec45f20afc54935771/ec2df0db871ba1ec45f20afc54935771.db repair -n --min-shard-age 100\nLoaded db broker for AUTH_test/junk\nRepairs necessary to remove overlapping shard ranges.\nChosen a complete sequence of 3 shard ranges with current total of 22 object records to accept object records from 3 overlapping donor shard ranges.\nOnce applied to the broker these changes will result in:\n    3 shard ranges being removed.\n    12 object records being moved to the chosen shard ranges.\nNo changes applied","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"15daadd5_8daa12b6","in_reply_to":"93c3a5c3_384c6c95","updated":"2022-08-19 05:23:58.000000000","message":"Thanks for the tests!","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4607f2775640d2bd05eab9305e35426b725fdc68","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"be69f7db_06330cb0","updated":"2022-08-22 09:00:05.000000000","message":"I posted my last review too soon and it is contradictory - let\u0027s chat before deciding on how to handle the \u0027analyze\u0027 subcommand. 😊","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"996041d50036e9413542cf35c91084f2e1148054","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"f0ff13fd_fdd0b8ad","updated":"2022-08-19 22:48:47.000000000","message":"Looks reasonable -- had one thought on repair vs analyze, though. If Alistair\u0027s OK with it, I certainly wouldn\u0027t block it.","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4193b60a9f4874191868beaa196da78dc9c28a14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b99d99a3_0937387a","updated":"2022-08-22 08:57:12.000000000","message":"oops, I didn\u0027t fully appreciate that analyze called the same method- it would make sense to add the same option for analyze as Tim suggests. Sorry - but it shouldn\u0027t be too much more work","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"85e6911b4fafff26ac36b7295f7426bea8bd3014","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"efcec548_d871ff47","updated":"2022-08-23 04:46:44.000000000","message":"thanks again for the clarification.","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"725a3232fc04136a47e991e775986d6966116203","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"a0fb18f4_db77985f","in_reply_to":"f0ff13fd_fdd0b8ad","updated":"2022-08-19 23:35:48.000000000","message":"Thanks for reviewing it again! I did have a discussion with Alistair on \"analyze\", analyze is not in best shape from his comments, that\u0027s why this MR only covers \"repair\" for now. We can cover it later in another MR if needed.","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"385a55a70e951432cf644552d45e3306168d5b34","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"ba6718a8_508f928b","updated":"2022-08-23 17:27:50.000000000","message":"Thank you all for the reviews.","commit_id":"61624ab837d8a7fbf141582fc0979cb2b1a21de3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4790027ce2d15bcb5e15453deb6b370db418eaae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"ddae3cb3_eb3261e1","updated":"2022-08-23 17:18:16.000000000","message":"Yeah, I think I\u0027m on board with this approach for analyze. Thanks!","commit_id":"61624ab837d8a7fbf141582fc0979cb2b1a21de3"}],"swift/cli/manage_shard_ranges.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":true,"context_lines":[{"line_number":600,"context_line":"        ts_now \u003d Timestamp.now()"},{"line_number":601,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":602,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":603,"context_line":"             if int(sr.timestamp) + args.recent_hrs_limit * 3600"},{"line_number":604,"context_line":"             \u003c\u003d ts_now.timestamp])"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return acceptor_path, overlapping_donors"}],"source_content_type":"text/x-python","patch_set":2,"id":"83636e99_d3b5eac5","line":603,"range":{"start_line":603,"start_character":16,"end_line":603,"end_character":19},"updated":"2022-08-12 17:09:35.000000000","message":"I think this could cast to float...but it doesn\u0027t make much difference when the recent_hrs_limit is one hour granularity :)","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        ts_now \u003d Timestamp.now()"},{"line_number":601,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":602,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":603,"context_line":"             if int(sr.timestamp) + args.recent_hrs_limit * 3600"},{"line_number":604,"context_line":"             \u003c\u003d ts_now.timestamp])"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return acceptor_path, overlapping_donors"}],"source_content_type":"text/x-python","patch_set":2,"id":"aefc5850_6a050032","line":603,"range":{"start_line":603,"start_character":16,"end_line":603,"end_character":19},"in_reply_to":"83636e99_d3b5eac5","updated":"2022-08-13 03:31:48.000000000","message":"Done","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":true,"context_lines":[{"line_number":601,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":602,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":603,"context_line":"             if int(sr.timestamp) + args.recent_hrs_limit * 3600"},{"line_number":604,"context_line":"             \u003c\u003d ts_now.timestamp])"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return acceptor_path, overlapping_donors"},{"line_number":607,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5c1ebb29_6e753b9b","line":604,"updated":"2022-08-12 17:09:35.000000000","message":"It would be nice to print a summary of either the number or the details of any donors that were ignored due to the age limit.","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":601,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":602,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":603,"context_line":"             if int(sr.timestamp) + args.recent_hrs_limit * 3600"},{"line_number":604,"context_line":"             \u003c\u003d ts_now.timestamp])"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    return acceptor_path, overlapping_donors"},{"line_number":607,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"f9c9e7c5_6033f6ee","line":604,"in_reply_to":"5c1ebb29_6e753b9b","updated":"2022-08-13 03:31:48.000000000","message":"Done","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e2b846cec3d4cdad2811b188f757de938c5457c8","unresolved":true,"context_lines":[{"line_number":796,"context_line":"    val \u003d int(arg)"},{"line_number":797,"context_line":"    if val \u003c 0:"},{"line_number":798,"context_line":"        raise argparse.ArgumentTypeError(\u0027must be \u003e\u003d 0\u0027)"},{"line_number":799,"context_line":"    return val"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"def _add_find_args(parser):"},{"line_number":802,"context_line":"    parser.add_argument("}],"source_content_type":"text/x-python","patch_set":2,"id":"374013ea_061efaa7","line":799,"updated":"2022-08-12 16:52:31.000000000","message":"do we need a new method to do this? \n\nhttps://github.com/openstack/swift/blob/master/swift/common/utils.py#L334-L346","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":796,"context_line":"    val \u003d int(arg)"},{"line_number":797,"context_line":"    if val \u003c 0:"},{"line_number":798,"context_line":"        raise argparse.ArgumentTypeError(\u0027must be \u003e\u003d 0\u0027)"},{"line_number":799,"context_line":"    return val"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"def _add_find_args(parser):"},{"line_number":802,"context_line":"    parser.add_argument("}],"source_content_type":"text/x-python","patch_set":2,"id":"a68faf80_370f117e","line":799,"in_reply_to":"2547998c_167039f9","updated":"2022-08-13 03:31:48.000000000","message":"argparse.ArgumentTypeError--\u003e\n#python swift/cli/manage_shard_ranges.py /dev/null find --minimum-shard-size 0\nmanage_shard_ranges.py path_to_file find: error: argument --minimum-shard-size: must be \u003e 0\nValueError--\u003e\n#python swift/cli/manage_shard_ranges.py /dev/null find --minimum-shard-size 0\nmanage_shard_ranges.py path_to_file find: error: argument --minimum-shard-size: invalid config_positive_int_value value: \u00270\u0027\n\nSlightly different messages, but I feel both of them are okay. I will also replace the _positive_int method with existing one.","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f569e0307d10e285870bf68580fa789aafb7f6e","unresolved":true,"context_lines":[{"line_number":796,"context_line":"    val \u003d int(arg)"},{"line_number":797,"context_line":"    if val \u003c 0:"},{"line_number":798,"context_line":"        raise argparse.ArgumentTypeError(\u0027must be \u003e\u003d 0\u0027)"},{"line_number":799,"context_line":"    return val"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":"def _add_find_args(parser):"},{"line_number":802,"context_line":"    parser.add_argument("}],"source_content_type":"text/x-python","patch_set":2,"id":"2547998c_167039f9","line":799,"in_reply_to":"374013ea_061efaa7","updated":"2022-08-12 17:12:49.000000000","message":"I also wondered the same, and why do we already have the _positive_int method - but I don\u0027t remember if it is because we wanted to raise a argparse.ArgumentTypeError here rather than ValueError\n\nMight be worth experimenting with the ValueError-raising-method and see how argparse behaves","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":true,"context_lines":[{"line_number":887,"context_line":"        help\u003d\u0027Force broker to commit pending object updates before finding \u0027"},{"line_number":888,"context_line":"             \u0027shard ranges. By default the broker will skip commits.\u0027)"},{"line_number":889,"context_line":"    parser.add_argument("},{"line_number":890,"context_line":"        \u0027--recent-hrs-limit\u0027, nargs\u003d\u0027?\u0027, type\u003d_non_negative_int,"},{"line_number":891,"context_line":"        default\u003dDEFAULT_REPAIR_IGNORED_RECENT_HOURS,"},{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"76cfeeb3_0d7a9898","line":890,"range":{"start_line":890,"start_character":9,"end_line":890,"end_character":27},"updated":"2022-08-12 17:09:35.000000000","message":"could be \u0027--min-donor-age\u0027","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        help\u003d\u0027Force broker to commit pending object updates before finding \u0027"},{"line_number":888,"context_line":"             \u0027shard ranges. By default the broker will skip commits.\u0027)"},{"line_number":889,"context_line":"    parser.add_argument("},{"line_number":890,"context_line":"        \u0027--recent-hrs-limit\u0027, nargs\u003d\u0027?\u0027, type\u003d_non_negative_int,"},{"line_number":891,"context_line":"        default\u003dDEFAULT_REPAIR_IGNORED_RECENT_HOURS,"},{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"4b94c0c6_32e8f578","line":890,"range":{"start_line":890,"start_character":9,"end_line":890,"end_character":27},"in_reply_to":"76cfeeb3_0d7a9898","updated":"2022-08-13 03:31:48.000000000","message":"Done","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":true,"context_lines":[{"line_number":889,"context_line":"    parser.add_argument("},{"line_number":890,"context_line":"        \u0027--recent-hrs-limit\u0027, nargs\u003d\u0027?\u0027, type\u003d_non_negative_int,"},{"line_number":891,"context_line":"        default\u003dDEFAULT_REPAIR_IGNORED_RECENT_HOURS,"},{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"},{"line_number":894,"context_line":"             \u0027analyze. Value of 0 means no recent shards will be ignored.\u0027"},{"line_number":895,"context_line":"             \u0027Defaults to %d\u0027 % DEFAULT_REPAIR_IGNORED_RECENT_HOURS)"}],"source_content_type":"text/x-python","patch_set":2,"id":"0609dd2a_ccaa356e","line":892,"range":{"start_line":892,"start_character":32,"end_line":892,"end_character":37},"updated":"2022-08-12 17:09:35.000000000","message":"I suggest using seconds - although it will be more verbose to type it is the default time unit used in most parts of the swift codebase.\n\nIn future we could improve by supporting values such as 10M or 4H but I think that for now raw seconds is sufficient.","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":889,"context_line":"    parser.add_argument("},{"line_number":890,"context_line":"        \u0027--recent-hrs-limit\u0027, nargs\u003d\u0027?\u0027, type\u003d_non_negative_int,"},{"line_number":891,"context_line":"        default\u003dDEFAULT_REPAIR_IGNORED_RECENT_HOURS,"},{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"},{"line_number":894,"context_line":"             \u0027analyze. Value of 0 means no recent shards will be ignored.\u0027"},{"line_number":895,"context_line":"             \u0027Defaults to %d\u0027 % DEFAULT_REPAIR_IGNORED_RECENT_HOURS)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c7af389f_1f7f90b6","line":892,"range":{"start_line":892,"start_character":32,"end_line":892,"end_character":37},"in_reply_to":"0609dd2a_ccaa356e","updated":"2022-08-13 03:31:48.000000000","message":"Done","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a58ec1d745cc37851c7990a2117b12a3eb1cbd3e","unresolved":true,"context_lines":[{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"},{"line_number":894,"context_line":"             \u0027analyze. Value of 0 means no recent shards will be ignored.\u0027"},{"line_number":895,"context_line":"             \u0027Defaults to %d\u0027 % DEFAULT_REPAIR_IGNORED_RECENT_HOURS)"},{"line_number":896,"context_line":"    subparsers \u003d parser.add_subparsers("},{"line_number":897,"context_line":"        dest\u003d\u0027subcommand\u0027, help\u003d\u0027Sub-command help\u0027, title\u003d\u0027Sub-commands\u0027)"},{"line_number":898,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"e76c2e92_33617801","line":895,"updated":"2022-08-12 17:09:35.000000000","message":"This might be better worded:\n\n  Minimum age of a shard for it to be considered as an overlap \n  that is due for repair. Overlapping shards younger than this \n  age will be ignored. Value of 0 means no recent shards will be \n  ignored. Defaults to %d.\u0027 % DEFAULT_REPAIR_IGNORED_RECENT_HOURS","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d4a03af690c8ba496e596d9d2f313ed502919e40","unresolved":false,"context_lines":[{"line_number":892,"context_line":"        help\u003d\u0027Maximum number of hours from past to now ignored for a recent \u0027"},{"line_number":893,"context_line":"             \u0027overlapping range shard to be included for range repair or \u0027"},{"line_number":894,"context_line":"             \u0027analyze. Value of 0 means no recent shards will be ignored.\u0027"},{"line_number":895,"context_line":"             \u0027Defaults to %d\u0027 % DEFAULT_REPAIR_IGNORED_RECENT_HOURS)"},{"line_number":896,"context_line":"    subparsers \u003d parser.add_subparsers("},{"line_number":897,"context_line":"        dest\u003d\u0027subcommand\u0027, help\u003d\u0027Sub-command help\u0027, title\u003d\u0027Sub-commands\u0027)"},{"line_number":898,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"2ac9b5da_92b7a455","line":895,"in_reply_to":"e76c2e92_33617801","updated":"2022-08-13 03:31:48.000000000","message":"Done","commit_id":"25e23a223eb38fa0c0c6a2f6d77ee84214bb1b47"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f2a6c7ade7320a08a980890998a7ea2c846de9e5","unresolved":true,"context_lines":[{"line_number":180,"context_line":"EXIT_INVALID_ARGS \u003d 2  # consistent with argparse exit code for invalid args"},{"line_number":181,"context_line":"EXIT_USER_QUIT \u003d 3"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"DEFAULT_MIN_DONOR_AGE_IN_SECONDS \u003d 4 * 3600"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# Some CLI options derive their default values from DEFAULT_SHARDER_CONF if"},{"line_number":186,"context_line":"# they have not been set. It is therefore important that the CLI parser"}],"source_content_type":"text/x-python","patch_set":3,"id":"455217e6_e1113c55","line":183,"updated":"2022-08-15 05:31:44.000000000","message":"Probe test failures on centos8 are legit -- we\u0027ll need to update the repair tests to override this default.\n\n(This default makes perfect sense for prod, though! If anything, 4hrs might be on the short side.)","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"996041d50036e9413542cf35c91084f2e1148054","unresolved":false,"context_lines":[{"line_number":180,"context_line":"EXIT_INVALID_ARGS \u003d 2  # consistent with argparse exit code for invalid args"},{"line_number":181,"context_line":"EXIT_USER_QUIT \u003d 3"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"DEFAULT_MIN_DONOR_AGE_IN_SECONDS \u003d 4 * 3600"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# Some CLI options derive their default values from DEFAULT_SHARDER_CONF if"},{"line_number":186,"context_line":"# they have not been set. It is therefore important that the CLI parser"}],"source_content_type":"text/x-python","patch_set":3,"id":"a00addc6_e93379b5","line":183,"in_reply_to":"32be8b1f_63a803a9","updated":"2022-08-19 22:48:47.000000000","message":"\u003e what do you feel the default value should be?\n\nHonestly, I\u0027m not sure. I think 4hrs will be fine to start; we might want to adjust after seeing how this goes in prod for a bit. Makes me realize I wish we had some metrics for how long we see overlaps...","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a963767f0263455deeeadf8adcc178ba49bf5cb","unresolved":true,"context_lines":[{"line_number":180,"context_line":"EXIT_INVALID_ARGS \u003d 2  # consistent with argparse exit code for invalid args"},{"line_number":181,"context_line":"EXIT_USER_QUIT \u003d 3"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"DEFAULT_MIN_DONOR_AGE_IN_SECONDS \u003d 4 * 3600"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# Some CLI options derive their default values from DEFAULT_SHARDER_CONF if"},{"line_number":186,"context_line":"# they have not been set. It is therefore important that the CLI parser"}],"source_content_type":"text/x-python","patch_set":3,"id":"69fa03dc_9440bdd5","line":183,"in_reply_to":"455217e6_e1113c55","updated":"2022-08-16 06:25:08.000000000","message":"Thanks! what do you feel the default value should be?","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d26a8c948aa7c574e1f95bd293702f9c711c6108","unresolved":false,"context_lines":[{"line_number":180,"context_line":"EXIT_INVALID_ARGS \u003d 2  # consistent with argparse exit code for invalid args"},{"line_number":181,"context_line":"EXIT_USER_QUIT \u003d 3"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"DEFAULT_MIN_DONOR_AGE_IN_SECONDS \u003d 4 * 3600"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"# Some CLI options derive their default values from DEFAULT_SHARDER_CONF if"},{"line_number":186,"context_line":"# they have not been set. It is therefore important that the CLI parser"}],"source_content_type":"text/x-python","patch_set":3,"id":"32be8b1f_63a803a9","line":183,"in_reply_to":"69fa03dc_9440bdd5","updated":"2022-08-17 04:00:07.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":true,"context_lines":[{"line_number":602,"context_line":"        ts_now \u003d Timestamp.now()"},{"line_number":603,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":604,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":605,"context_line":"             if float(sr.timestamp) + args.min_donor_age \u003c\u003d float(ts_now)])"},{"line_number":606,"context_line":"        num_ignored_donors \u003d num_original_donors - len(overlapping_donors)"},{"line_number":607,"context_line":"        if num_ignored_donors \u003e 0:"},{"line_number":608,"context_line":"            print("}],"source_content_type":"text/x-python","patch_set":3,"id":"0eb52897_d453c99f","line":605,"updated":"2022-08-15 11:36:24.000000000","message":"We also need to check the acceptor path, in case the acceptor that is overlapped is new (in the case where we may perhaps have a parent and children shard, we don\u0027t know if the parent or the recently-created children are in the acceptor path vs the donors).\n\nFortunately we have a ShardRange.overlaps method, so if we iterate over the acceptor path we can check if each acceptor.overlaps(donor) for all donors, and if it does then check its age.","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a963767f0263455deeeadf8adcc178ba49bf5cb","unresolved":true,"context_lines":[{"line_number":602,"context_line":"        ts_now \u003d Timestamp.now()"},{"line_number":603,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":604,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":605,"context_line":"             if float(sr.timestamp) + args.min_donor_age \u003c\u003d float(ts_now)])"},{"line_number":606,"context_line":"        num_ignored_donors \u003d num_original_donors - len(overlapping_donors)"},{"line_number":607,"context_line":"        if num_ignored_donors \u003e 0:"},{"line_number":608,"context_line":"            print("}],"source_content_type":"text/x-python","patch_set":3,"id":"2d276890_9f32f7a4","line":605,"in_reply_to":"0eb52897_d453c99f","updated":"2022-08-16 06:25:08.000000000","message":"if one acceptor in the acceptor path is overlapping and young, what should we do with it, just remove the whole acceptor path? if that\u0027s the case, we can just check all acceptors\u0027 age one by one then.","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d26a8c948aa7c574e1f95bd293702f9c711c6108","unresolved":false,"context_lines":[{"line_number":602,"context_line":"        ts_now \u003d Timestamp.now()"},{"line_number":603,"context_line":"        overlapping_donors \u003d ShardRangeList("},{"line_number":604,"context_line":"            [sr for sr in overlapping_donors"},{"line_number":605,"context_line":"             if float(sr.timestamp) + args.min_donor_age \u003c\u003d float(ts_now)])"},{"line_number":606,"context_line":"        num_ignored_donors \u003d num_original_donors - len(overlapping_donors)"},{"line_number":607,"context_line":"        if num_ignored_donors \u003e 0:"},{"line_number":608,"context_line":"            print("}],"source_content_type":"text/x-python","patch_set":3,"id":"78b2417d_77962bc2","line":605,"in_reply_to":"2d276890_9f32f7a4","updated":"2022-08-17 04:00:07.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":true,"context_lines":[{"line_number":849,"context_line":""},{"line_number":850,"context_line":"def _add_max_expanding_arg(parser):"},{"line_number":851,"context_line":"    parser.add_argument(\u0027--max-expanding\u0027, nargs\u003d\u0027?\u0027,"},{"line_number":852,"context_line":"                        type\u003dconfig_positive_int_value,"},{"line_number":853,"context_line":"                        default\u003dUSE_SHARDER_DEFAULT,"},{"line_number":854,"context_line":"                        help\u003d\u0027Maximum number of shards that should be \u0027"},{"line_number":855,"context_line":"                             \u0027expanded. Defaults to unlimited.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"13487043_2e1ed251","line":852,"updated":"2022-08-15 11:36:24.000000000","message":"sorry, we suggested re-using this method, but this does on reflection seem like a backwards step in terms of user experience:\n\nafter:\n\n  vagrant@saio:~/swift$ swift-manage-shard-ranges /srv/node3/sdb3/containers/944/771/ec2df0db871ba1ec45f20afc54935771/ec2df0db871ba1ec45f20afc54935771.db repair -\n-max-expanding 0\nusage: swift-manage-shard-ranges path_to_file repair [-h] [--yes | --dry-run] [--min-donor-age [MIN_DONOR_AGE]] [--gaps] [--max-expanding [MAX_EXPANDING]]\nswift-manage-shard-ranges path_to_file repair: error: argument --max-expanding: invalid config_positive_int_value value: \u00270\u0027\n\nbefore:\n\n  vagrant@saio:~/swift$ swift-manage-shard-ranges /srv/node3/sdb3/containers/944/771/ec2df0db871ba1ec45f20afc54935771/ec2df0db871ba1ec45f20afc54935771.db repair --max-expanding 0\nusage: swift-manage-shard-ranges path_to_file repair [-h] [--yes | --dry-run] [--gaps] [--max-expanding [MAX_EXPANDING]]\nswift-manage-shard-ranges path_to_file repair: error: argument --max-expanding: must be \u003e 0\n\nothers may disagree!\n\nIMHO the compromise to re-use the utils helper but retain the nice user feedback would be something like https://paste.openstack.org/show/b7D3VygOjFZ9ammzJmDK/              \n\nwrap_for_argparse could actually go in the utils module","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d26a8c948aa7c574e1f95bd293702f9c711c6108","unresolved":false,"context_lines":[{"line_number":849,"context_line":""},{"line_number":850,"context_line":"def _add_max_expanding_arg(parser):"},{"line_number":851,"context_line":"    parser.add_argument(\u0027--max-expanding\u0027, nargs\u003d\u0027?\u0027,"},{"line_number":852,"context_line":"                        type\u003dconfig_positive_int_value,"},{"line_number":853,"context_line":"                        default\u003dUSE_SHARDER_DEFAULT,"},{"line_number":854,"context_line":"                        help\u003d\u0027Maximum number of shards that should be \u0027"},{"line_number":855,"context_line":"                             \u0027expanded. Defaults to unlimited.\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"4fb8f781_8d53de50","line":852,"in_reply_to":"13487043_2e1ed251","updated":"2022-08-17 04:00:07.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":true,"context_lines":[{"line_number":990,"context_line":"        help\u003d\u0027Minimum age of a shard for it to be considered as an overlap \u0027"},{"line_number":991,"context_line":"             \u0027that is due for repair. Overlapping shards younger than this \u0027"},{"line_number":992,"context_line":"             \u0027age will be ignored. Value of 0 means no recent shards will be \u0027"},{"line_number":993,"context_line":"             \u0027ignored. Defaults to %d\u0027 % DEFAULT_MIN_DONOR_AGE_IN_SECONDS)"},{"line_number":994,"context_line":"    # TODO: maybe this should be a separate subcommand given that it needs"},{"line_number":995,"context_line":"    #  some extra options vs repairing overlaps?"},{"line_number":996,"context_line":"    repair_parser.add_argument("}],"source_content_type":"text/x-python","patch_set":3,"id":"e8e17de9_44471756","line":993,"range":{"start_line":993,"start_character":35,"end_line":993,"end_character":37},"updated":"2022-08-15 11:36:24.000000000","message":"nit: missing period at end of sentence","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"7a963767f0263455deeeadf8adcc178ba49bf5cb","unresolved":false,"context_lines":[{"line_number":990,"context_line":"        help\u003d\u0027Minimum age of a shard for it to be considered as an overlap \u0027"},{"line_number":991,"context_line":"             \u0027that is due for repair. Overlapping shards younger than this \u0027"},{"line_number":992,"context_line":"             \u0027age will be ignored. Value of 0 means no recent shards will be \u0027"},{"line_number":993,"context_line":"             \u0027ignored. Defaults to %d\u0027 % DEFAULT_MIN_DONOR_AGE_IN_SECONDS)"},{"line_number":994,"context_line":"    # TODO: maybe this should be a separate subcommand given that it needs"},{"line_number":995,"context_line":"    #  some extra options vs repairing overlaps?"},{"line_number":996,"context_line":"    repair_parser.add_argument("}],"source_content_type":"text/x-python","patch_set":3,"id":"cc0bb6fe_c2ae3f79","line":993,"range":{"start_line":993,"start_character":35,"end_line":993,"end_character":37},"in_reply_to":"e8e17de9_44471756","updated":"2022-08-16 06:25:08.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":583,"context_line":"        return acceptor_path, None"},{"line_number":584,"context_line":"    # Remove those overlapping donors whose overlapping acceptors were created"},{"line_number":585,"context_line":"    # within age limit."},{"line_number":586,"context_line":"    parent_donors \u003d set()"},{"line_number":587,"context_line":"    for acceptor_sr in acceptor_path:"},{"line_number":588,"context_line":"        if float(acceptor_sr.timestamp) + args.min_shard_age \u003c float(ts_now):"},{"line_number":589,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aa4c712_2c2785c9","line":586,"range":{"start_line":586,"start_character":20,"end_line":586,"end_character":23},"updated":"2022-08-18 14:29:21.000000000","message":"this is ok, but worth noting that ShardRange.__hash__ is based (unusually) on the object id (i.e. each instance will hash differently) rather than the \"value\" of the object [1], so we need to be careful using sets because two ShardRanges with the same name, timestamp, upper and lower could both end up in the set. It is OK here because the set is only populated from qualified_donors which is already a set of unique ShardRanges.\n\n  s1 \u003d u.ShardRange(\u0027a/c\u0027, 123, \u0027l\u0027, \u0027u\u0027)\n  s2 \u003d u.ShardRange(\u0027a/c\u0027, 123, \u0027l\u0027, \u0027u\u0027)\n  len(set([s1, s2]))\n  2\n  \n  [1] https://github.com/openstack/swift/blob/2d063cd61f6915579840a41ac0248a26085e0245/swift/common/utils.py#L5645-L5649","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":583,"context_line":"        return acceptor_path, None"},{"line_number":584,"context_line":"    # Remove those overlapping donors whose overlapping acceptors were created"},{"line_number":585,"context_line":"    # within age limit."},{"line_number":586,"context_line":"    parent_donors \u003d set()"},{"line_number":587,"context_line":"    for acceptor_sr in acceptor_path:"},{"line_number":588,"context_line":"        if float(acceptor_sr.timestamp) + args.min_shard_age \u003c float(ts_now):"},{"line_number":589,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"a019a29c_0d3f683f","line":586,"range":{"start_line":586,"start_character":20,"end_line":586,"end_character":23},"in_reply_to":"3aa4c712_2c2785c9","updated":"2022-08-19 05:23:58.000000000","message":"Yes, I assumed ShardRange.__hash__ is based on content. But unique ShardRange and id worked in this case, thanks for pointing it out.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":589,"context_line":"            continue"},{"line_number":590,"context_line":"        for donor_sr in qualified_donors:"},{"line_number":591,"context_line":"            if acceptor_sr.overlaps(donor_sr):"},{"line_number":592,"context_line":"                parent_donors.add(donor_sr)"},{"line_number":593,"context_line":"    if parent_donors:"},{"line_number":594,"context_line":"        qualified_donors \u003d ShardRangeList("},{"line_number":595,"context_line":"            [sr for sr in qualified_donors if sr not in parent_donors])"}],"source_content_type":"text/x-python","patch_set":5,"id":"34b0a11d_3ffe72e9","line":592,"updated":"2022-08-18 14:29:21.000000000","message":"nit: this could be written:\n\n  parent_donors.update([sr for sr in qualified_donors\n                        if acceptor_sr.overlaps(sr)])","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":589,"context_line":"            continue"},{"line_number":590,"context_line":"        for donor_sr in qualified_donors:"},{"line_number":591,"context_line":"            if acceptor_sr.overlaps(donor_sr):"},{"line_number":592,"context_line":"                parent_donors.add(donor_sr)"},{"line_number":593,"context_line":"    if parent_donors:"},{"line_number":594,"context_line":"        qualified_donors \u003d ShardRangeList("},{"line_number":595,"context_line":"            [sr for sr in qualified_donors if sr not in parent_donors])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9b285aeb_b693a299","line":592,"in_reply_to":"34b0a11d_3ffe72e9","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":590,"context_line":"        for donor_sr in qualified_donors:"},{"line_number":591,"context_line":"            if acceptor_sr.overlaps(donor_sr):"},{"line_number":592,"context_line":"                parent_donors.add(donor_sr)"},{"line_number":593,"context_line":"    if parent_donors:"},{"line_number":594,"context_line":"        qualified_donors \u003d ShardRangeList("},{"line_number":595,"context_line":"            [sr for sr in qualified_donors if sr not in parent_donors])"},{"line_number":596,"context_line":"        print(\u0027%d donor shards ignored due to existence of overlapping young \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ebbb1c1_c092b8a2","line":593,"range":{"start_line":593,"start_character":7,"end_line":593,"end_character":20},"updated":"2022-08-18 14:29:21.000000000","message":"nit: strictly speaking these are not necessarily \u0027parents\u0027, but we expect them to be and I cannot think of a better name! no change needed.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        for donor_sr in qualified_donors:"},{"line_number":591,"context_line":"            if acceptor_sr.overlaps(donor_sr):"},{"line_number":592,"context_line":"                parent_donors.add(donor_sr)"},{"line_number":593,"context_line":"    if parent_donors:"},{"line_number":594,"context_line":"        qualified_donors \u003d ShardRangeList("},{"line_number":595,"context_line":"            [sr for sr in qualified_donors if sr not in parent_donors])"},{"line_number":596,"context_line":"        print(\u0027%d donor shards ignored due to existence of overlapping young \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"23c32062_edd2a105","line":593,"range":{"start_line":593,"start_character":7,"end_line":593,"end_character":20},"in_reply_to":"9ebbb1c1_c092b8a2","updated":"2022-08-19 05:23:58.000000000","message":"I wasn\u0027t able to figure out a good name too! How about \"possible_parent_donors\"? we do want to make ourselves clear.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":650,"context_line":"            acceptor_path, overlapping_donors)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    return _remove_young_overlapping_ranges("},{"line_number":653,"context_line":"        acceptor_path, overlapping_donors, args)"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"def _fix_gaps(broker, args, paths_with_gaps):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ab05383_a00c179d","line":653,"updated":"2022-08-18 14:29:21.000000000","message":"+1 for breaking out a new method :)","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":650,"context_line":"            acceptor_path, overlapping_donors)"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    return _remove_young_overlapping_ranges("},{"line_number":653,"context_line":"        acceptor_path, overlapping_donors, args)"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"def _fix_gaps(broker, args, paths_with_gaps):"}],"source_content_type":"text/x-python","patch_set":5,"id":"cabb1eaa_218dc334","line":653,"in_reply_to":"9ab05383_a00c179d","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"996041d50036e9413542cf35c91084f2e1148054","unresolved":true,"context_lines":[{"line_number":567,"context_line":"def _remove_young_overlapping_ranges(acceptor_path, overlapping_donors, args):"},{"line_number":568,"context_line":"    # For range shard repair subcommand, check possible parent-children"},{"line_number":569,"context_line":"    # relationship between acceptors and donors."},{"line_number":570,"context_line":"    if args.subcommand !\u003d \u0027repair\u0027 or args.min_shard_age \u003d\u003d 0:"},{"line_number":571,"context_line":"        return acceptor_path, overlapping_donors"},{"line_number":572,"context_line":"    ts_now \u003d Timestamp.now()"},{"line_number":573,"context_line":"    # Remove overlapping donor shard ranges who were created recently within"}],"source_content_type":"text/x-python","patch_set":8,"id":"d6860c70_9be97d5c","line":570,"range":{"start_line":570,"start_character":7,"end_line":570,"end_character":34},"updated":"2022-08-19 22:48:47.000000000","message":"OK, so we can get here from repair or analyze -- are we sure we want them to give different answers like this? Would it be better for analyze to also grow the new option?","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"85e6911b4fafff26ac36b7295f7426bea8bd3014","unresolved":false,"context_lines":[{"line_number":567,"context_line":"def _remove_young_overlapping_ranges(acceptor_path, overlapping_donors, args):"},{"line_number":568,"context_line":"    # For range shard repair subcommand, check possible parent-children"},{"line_number":569,"context_line":"    # relationship between acceptors and donors."},{"line_number":570,"context_line":"    if args.subcommand !\u003d \u0027repair\u0027 or args.min_shard_age \u003d\u003d 0:"},{"line_number":571,"context_line":"        return acceptor_path, overlapping_donors"},{"line_number":572,"context_line":"    ts_now \u003d Timestamp.now()"},{"line_number":573,"context_line":"    # Remove overlapping donor shard ranges who were created recently within"}],"source_content_type":"text/x-python","patch_set":8,"id":"d02c9378_0e8887e2","line":570,"range":{"start_line":570,"start_character":7,"end_line":570,"end_character":34},"in_reply_to":"1b9fbe22_d0e2ce2f","updated":"2022-08-23 04:46:44.000000000","message":"Done","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4193b60a9f4874191868beaa196da78dc9c28a14","unresolved":true,"context_lines":[{"line_number":567,"context_line":"def _remove_young_overlapping_ranges(acceptor_path, overlapping_donors, args):"},{"line_number":568,"context_line":"    # For range shard repair subcommand, check possible parent-children"},{"line_number":569,"context_line":"    # relationship between acceptors and donors."},{"line_number":570,"context_line":"    if args.subcommand !\u003d \u0027repair\u0027 or args.min_shard_age \u003d\u003d 0:"},{"line_number":571,"context_line":"        return acceptor_path, overlapping_donors"},{"line_number":572,"context_line":"    ts_now \u003d Timestamp.now()"},{"line_number":573,"context_line":"    # Remove overlapping donor shard ranges who were created recently within"}],"source_content_type":"text/x-python","patch_set":8,"id":"1b9fbe22_d0e2ce2f","line":570,"range":{"start_line":570,"start_character":7,"end_line":570,"end_character":34},"in_reply_to":"d6860c70_9be97d5c","updated":"2022-08-22 08:57:12.000000000","message":"OIC, I hadn\u0027t fully appreciated that analyze also ended up here - I thought the condition was just defensive coding.\n\nI think it would be better for analyze to either:\n\n1) hard code args.min_shard_age \u003d 0 so that this code path is ok without the guard condition\n\nor\n\n2) fully support the command line option same as repair\n\nThe reason I\u0027m wondering about option 1 is whether the semantic of \u0027analyze\u0027 should be \u0027tell me everything of interest about these shard ranges\u0027[1] (therefore no default filtering) vs \u0027repair\u0027 being \u0027guide me to sensible modifications\u0027.\n\nI\u0027d prefer us not to spend time supporting the command line option for \u0027analyze\u0027 but with a *different* default, given how little use analyze gets in my experience.\n\n\n[1] of course, right now \u0027analyze\u0027 does not tell us much because it hasn\u0027t been developed much e.g. it does not report gaps.","commit_id":"f4e5e8b30c8aa0e9b23a7a9d8a1c69f1c2a51bcc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4f5b6eb361a049c647b89c4f2f366d1f1d8ba88","unresolved":true,"context_lines":[{"line_number":1058,"context_line":"        help\u003d\u0027Minimum age of a shard for it to be considered as an overlap \u0027"},{"line_number":1059,"context_line":"        \u0027that is due for repair. Overlapping shards younger than this \u0027"},{"line_number":1060,"context_line":"        \u0027age will be ignored. Value of 0 means no recent shards will be \u0027"},{"line_number":1061,"context_line":"        \u0027ignored. Defaults to 0.\u0027)"},{"line_number":1062,"context_line":"    analyze_parser.set_defaults(func\u003danalyze_shard_ranges)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    return parser"}],"source_content_type":"text/x-python","patch_set":9,"id":"1f33f0d0_5598f9b0","line":1061,"updated":"2022-08-23 11:22:24.000000000","message":"I\u0027m happy with this. I discussed with JianJian and my feeling is that for the analyze command (vs repair) it is not appropriate to filter out overlaps based on age *by default* so the default of 0 here makes sense.","commit_id":"61624ab837d8a7fbf141582fc0979cb2b1a21de3"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"385a55a70e951432cf644552d45e3306168d5b34","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        help\u003d\u0027Minimum age of a shard for it to be considered as an overlap \u0027"},{"line_number":1059,"context_line":"        \u0027that is due for repair. Overlapping shards younger than this \u0027"},{"line_number":1060,"context_line":"        \u0027age will be ignored. Value of 0 means no recent shards will be \u0027"},{"line_number":1061,"context_line":"        \u0027ignored. Defaults to 0.\u0027)"},{"line_number":1062,"context_line":"    analyze_parser.set_defaults(func\u003danalyze_shard_ranges)"},{"line_number":1063,"context_line":""},{"line_number":1064,"context_line":"    return parser"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba7daef6_eb4ce283","line":1061,"in_reply_to":"1f33f0d0_5598f9b0","updated":"2022-08-23 17:27:50.000000000","message":"Done","commit_id":"61624ab837d8a7fbf141582fc0979cb2b1a21de3"}],"test/probe/test_sharder.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":3143,"context_line":"        db_file \u003d self.get_db_file(self.brain.part, self.brain.nodes[0])"},{"line_number":3144,"context_line":"        self.assert_subprocess_success("},{"line_number":3145,"context_line":"            [\u0027swift-manage-shard-ranges\u0027, db_file, \u0027repair\u0027, \u0027--yes\u0027,"},{"line_number":3146,"context_line":"             \u0027--min-shard-age\u0027, \u00270\u0027])"},{"line_number":3147,"context_line":""},{"line_number":3148,"context_line":"        # make sure all root replicas now sync their shard ranges"},{"line_number":3149,"context_line":"        self.replicators.once()"}],"source_content_type":"text/x-python","patch_set":5,"id":"d4e4f47c_e5d99730","line":3146,"updated":"2022-08-18 14:29:21.000000000","message":"+1","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":3143,"context_line":"        db_file \u003d self.get_db_file(self.brain.part, self.brain.nodes[0])"},{"line_number":3144,"context_line":"        self.assert_subprocess_success("},{"line_number":3145,"context_line":"            [\u0027swift-manage-shard-ranges\u0027, db_file, \u0027repair\u0027, \u0027--yes\u0027,"},{"line_number":3146,"context_line":"             \u0027--min-shard-age\u0027, \u00270\u0027])"},{"line_number":3147,"context_line":""},{"line_number":3148,"context_line":"        # make sure all root replicas now sync their shard ranges"},{"line_number":3149,"context_line":"        self.replicators.once()"}],"source_content_type":"text/x-python","patch_set":5,"id":"93a1d34d_39fa9a4e","line":3146,"in_reply_to":"d4e4f47c_e5d99730","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"}],"test/unit/cli/test_manage_shard_ranges.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"fbc3432c2755e765a85470729585c43bb1deae45","unresolved":true,"context_lines":[{"line_number":2253,"context_line":"        expected \u003d sorted("},{"line_number":2254,"context_line":"            shard_ranges + overlap_shard_ranges_2,"},{"line_number":2255,"context_line":"            key\u003dShardRange.sort_key)"},{"line_number":2256,"context_line":"        self.assert_shard_ranges_equal(expected, updated_ranges)"},{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"    def test_repair_two_complete_sequences_one_incomplete(self):"},{"line_number":2259,"context_line":"        broker \u003d self._make_broker()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9456d550_d0af1b25","line":2256,"updated":"2022-08-15 11:36:24.000000000","message":"good tests!\n\na version where the overlaps are young but the acceptors are old, and also the other way round would be useful to cover the case when the too-young shard is actually in the acceptor path","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"d26a8c948aa7c574e1f95bd293702f9c711c6108","unresolved":false,"context_lines":[{"line_number":2253,"context_line":"        expected \u003d sorted("},{"line_number":2254,"context_line":"            shard_ranges + overlap_shard_ranges_2,"},{"line_number":2255,"context_line":"            key\u003dShardRange.sort_key)"},{"line_number":2256,"context_line":"        self.assert_shard_ranges_equal(expected, updated_ranges)"},{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"    def test_repair_two_complete_sequences_one_incomplete(self):"},{"line_number":2259,"context_line":"        broker \u003d self._make_broker()"}],"source_content_type":"text/x-python","patch_set":3,"id":"032f659c_e68e1f0f","line":2256,"in_reply_to":"9456d550_d0af1b25","updated":"2022-08-17 04:00:07.000000000","message":"Done","commit_id":"ca4326e9c30d84a79c4c2d31a56908bbbe1e1379"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2197,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"},{"line_number":2198,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2199,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2200,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2201,"context_line":"        broker.merge_shard_ranges(shard_ranges + overlap_shard_ranges_2)"},{"line_number":2202,"context_line":"        self.assertTrue(broker.is_root_container())"},{"line_number":2203,"context_line":"        out \u003d StringIO()"}],"source_content_type":"text/x-python","patch_set":5,"id":"76020600_aaa228c2","line":2200,"updated":"2022-08-18 14:29:21.000000000","message":"ok, so the overlaps are younger","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2197,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"},{"line_number":2198,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2199,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2200,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2201,"context_line":"        broker.merge_shard_ranges(shard_ranges + overlap_shard_ranges_2)"},{"line_number":2202,"context_line":"        self.assertTrue(broker.is_root_container())"},{"line_number":2203,"context_line":"        out \u003d StringIO()"}],"source_content_type":"text/x-python","patch_set":5,"id":"d4ac8e2b_1f036015","line":2200,"in_reply_to":"76020600_aaa228c2","updated":"2022-08-19 05:23:58.000000000","message":"yes, I also just made a change to be more clear.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2224,"context_line":"        # expect no overlapping ranges to be repaired."},{"line_number":2225,"context_line":"        broker \u003d self._make_broker()"},{"line_number":2226,"context_line":"        broker.set_sharding_sysmeta(\u0027Quoted-Root\u0027, \u0027a/c\u0027)"},{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"eafddc9b_9f3ea73d","line":2227,"range":{"start_line":2227,"start_character":32,"end_line":2227,"end_character":50},"updated":"2022-08-18 14:29:21.000000000","message":"if we call this \u0027now\u0027...","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2224,"context_line":"        # expect no overlapping ranges to be repaired."},{"line_number":2225,"context_line":"        broker \u003d self._make_broker()"},{"line_number":2226,"context_line":"        broker.set_sharding_sysmeta(\u0027Quoted-Root\u0027, \u0027a/c\u0027)"},{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a5b390d_02e9dc34","line":2227,"range":{"start_line":2227,"start_character":32,"end_line":2227,"end_character":50},"in_reply_to":"eafddc9b_9f3ea73d","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2226,"context_line":"        broker.set_sharding_sysmeta(\u0027Quoted-Root\u0027, \u0027a/c\u0027)"},{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"},{"line_number":2231,"context_line":"            shard_ranges \u003d make_shard_ranges("},{"line_number":2232,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"46e463d2_554510d4","line":2229,"updated":"2022-08-18 14:29:21.000000000","message":"ok, the overlaps are much older in this test","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2226,"context_line":"        broker.set_sharding_sysmeta(\u0027Quoted-Root\u0027, \u0027a/c\u0027)"},{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"},{"line_number":2231,"context_line":"            shard_ranges \u003d make_shard_ranges("},{"line_number":2232,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"0dbaa924_fc30b43b","line":2229,"in_reply_to":"46e463d2_554510d4","updated":"2022-08-19 05:23:58.000000000","message":"Ack","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"},{"line_number":2231,"context_line":"            shard_ranges \u003d make_shard_ranges("},{"line_number":2232,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"},{"line_number":2233,"context_line":"        broker.merge_shard_ranges(shard_ranges + overlap_shard_ranges_2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"f5295e3f_23d1c684","line":2230,"range":{"start_line":2230,"start_character":32,"end_line":2230,"end_character":75},"updated":"2022-08-18 14:29:21.000000000","message":"...then ts_iter increments by 1 second so this is now + 3602","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2227,"context_line":"        with mock_timestamp_now(next(self.ts_iter)):"},{"line_number":2228,"context_line":"            overlap_shard_ranges_2 \u003d make_shard_ranges("},{"line_number":2229,"context_line":"                broker, self.overlap_shard_data_2, \u0027.shards_\u0027)"},{"line_number":2230,"context_line":"        with mock_timestamp_now(Timestamp(float(next(self.ts_iter)) + 3601)):"},{"line_number":2231,"context_line":"            shard_ranges \u003d make_shard_ranges("},{"line_number":2232,"context_line":"                broker, self.shard_data, \u0027.shards_\u0027)"},{"line_number":2233,"context_line":"        broker.merge_shard_ranges(shard_ranges + overlap_shard_ranges_2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"84d7240f_648d0e02","line":2230,"range":{"start_line":2230,"start_character":32,"end_line":2230,"end_character":75},"in_reply_to":"f5295e3f_23d1c684","updated":"2022-08-19 05:23:58.000000000","message":"I will change them all to use now instead of ts_iter.","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2234,"context_line":"        self.assertTrue(broker.is_root_container())"},{"line_number":2235,"context_line":"        out \u003d StringIO()"},{"line_number":2236,"context_line":"        err \u003d StringIO()"},{"line_number":2237,"context_line":"        ts_1hr_after \u003d Timestamp(int(Timestamp.now()) + 3601)"},{"line_number":2238,"context_line":"        with mock.patch(\u0027sys.stdout\u0027, out), \\"},{"line_number":2239,"context_line":"                mock.patch(\u0027sys.stderr\u0027, err), \\"},{"line_number":2240,"context_line":"                mock_timestamp_now(ts_1hr_after):"}],"source_content_type":"text/x-python","patch_set":5,"id":"704b6ad6_322ca261","line":2237,"range":{"start_line":2237,"start_character":23,"end_line":2237,"end_character":61},"updated":"2022-08-18 14:29:21.000000000","message":"... and this is \u0027now\u0027 + 3601 + tiny amount\n\nthe test will pass until this reaches \u0027now\u0027 + 3663\n\nThe test might be clearer if it used explicit times rather than the ts_iter, e.g.\n\n  now \u003d next(self.ts_iter)\n  \n  create shard ranges with mock_timestamp_now(Timestamp(float(now) + 3601))\n  \n  run the repair at Timestamp(float(now) + 3601 + 59)","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2234,"context_line":"        self.assertTrue(broker.is_root_container())"},{"line_number":2235,"context_line":"        out \u003d StringIO()"},{"line_number":2236,"context_line":"        err \u003d StringIO()"},{"line_number":2237,"context_line":"        ts_1hr_after \u003d Timestamp(int(Timestamp.now()) + 3601)"},{"line_number":2238,"context_line":"        with mock.patch(\u0027sys.stdout\u0027, out), \\"},{"line_number":2239,"context_line":"                mock.patch(\u0027sys.stderr\u0027, err), \\"},{"line_number":2240,"context_line":"                mock_timestamp_now(ts_1hr_after):"}],"source_content_type":"text/x-python","patch_set":5,"id":"d496981a_04d7c02a","line":2237,"range":{"start_line":2237,"start_character":23,"end_line":2237,"end_character":61},"in_reply_to":"704b6ad6_322ca261","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e3f7fb8f0b31c46702c2cfdb0d2e2d77d4c26eeb","unresolved":true,"context_lines":[{"line_number":2289,"context_line":"        expected \u003d sorted("},{"line_number":2290,"context_line":"            shard_ranges + overlap_shard_ranges_2,"},{"line_number":2291,"context_line":"            key\u003dShardRange.sort_key)"},{"line_number":2292,"context_line":"        self.assert_shard_ranges_equal(expected, updated_ranges)"},{"line_number":2293,"context_line":""},{"line_number":2294,"context_line":"    def test_repair_two_complete_sequences_one_incomplete(self):"},{"line_number":2295,"context_line":"        broker \u003d self._make_broker()"}],"source_content_type":"text/x-python","patch_set":5,"id":"4294bee0_5483eab9","line":2292,"updated":"2022-08-18 14:29:21.000000000","message":"these tests are great\n\nmaybe just one more that does NOT set --min-shard-age and verifies that the default age is used, e.g.:\n\nhttps://paste.openstack.org/show/bjhTwyvkdy97U9YBoaPG/","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"89c8115c5e786a194aab967919fe805f950bb51a","unresolved":false,"context_lines":[{"line_number":2289,"context_line":"        expected \u003d sorted("},{"line_number":2290,"context_line":"            shard_ranges + overlap_shard_ranges_2,"},{"line_number":2291,"context_line":"            key\u003dShardRange.sort_key)"},{"line_number":2292,"context_line":"        self.assert_shard_ranges_equal(expected, updated_ranges)"},{"line_number":2293,"context_line":""},{"line_number":2294,"context_line":"    def test_repair_two_complete_sequences_one_incomplete(self):"},{"line_number":2295,"context_line":"        broker \u003d self._make_broker()"}],"source_content_type":"text/x-python","patch_set":5,"id":"ce645053_78557a34","line":2292,"in_reply_to":"4294bee0_5483eab9","updated":"2022-08-19 05:23:58.000000000","message":"Done","commit_id":"a6cfbe7942b7c51f28065cceb7ea8f838b0a7fc6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"16799620f49f077adb6be1c64ebf8c2ae67e20a6","unresolved":true,"context_lines":[{"line_number":2335,"context_line":"        with mock.patch(\u0027sys.stdout\u0027, out), \\"},{"line_number":2336,"context_line":"                mock.patch(\u0027sys.stderr\u0027, err), \\"},{"line_number":2337,"context_line":"                mock_timestamp_now(ts_repair):"},{"line_number":2338,"context_line":"            # default min-shard-age prevents repair..."},{"line_number":2339,"context_line":"            ret \u003d main([broker.db_file, \u0027repair\u0027, \u0027-y\u0027])"},{"line_number":2340,"context_line":"        self.assertEqual(0, ret)"},{"line_number":2341,"context_line":"        err_lines \u003d err.getvalue().split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"cf7912f1_a4e26f1d","line":2338,"range":{"start_line":2338,"start_character":12,"end_line":2338,"end_character":54},"updated":"2022-08-19 08:02:32.000000000","message":"argh, this comment is wrong - was my mistake!","commit_id":"c0923ded47663bf677998575055f674729d98223"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"725a3232fc04136a47e991e775986d6966116203","unresolved":false,"context_lines":[{"line_number":2335,"context_line":"        with mock.patch(\u0027sys.stdout\u0027, out), \\"},{"line_number":2336,"context_line":"                mock.patch(\u0027sys.stderr\u0027, err), \\"},{"line_number":2337,"context_line":"                mock_timestamp_now(ts_repair):"},{"line_number":2338,"context_line":"            # default min-shard-age prevents repair..."},{"line_number":2339,"context_line":"            ret \u003d main([broker.db_file, \u0027repair\u0027, \u0027-y\u0027])"},{"line_number":2340,"context_line":"        self.assertEqual(0, ret)"},{"line_number":2341,"context_line":"        err_lines \u003d err.getvalue().split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"4b6c9f33_d3117076","line":2338,"range":{"start_line":2338,"start_character":12,"end_line":2338,"end_character":54},"in_reply_to":"87e831be_8361b8b1","updated":"2022-08-19 23:35:48.000000000","message":"My last patchset update only has this line of change to fix the comment. But it lost your code-review +2. Please kindly +1 again next week. Thanks!","commit_id":"c0923ded47663bf677998575055f674729d98223"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"88e24e8c8785d6ee1fa0a4b5f33bc688d0873dcc","unresolved":false,"context_lines":[{"line_number":2335,"context_line":"        with mock.patch(\u0027sys.stdout\u0027, out), \\"},{"line_number":2336,"context_line":"                mock.patch(\u0027sys.stderr\u0027, err), \\"},{"line_number":2337,"context_line":"                mock_timestamp_now(ts_repair):"},{"line_number":2338,"context_line":"            # default min-shard-age prevents repair..."},{"line_number":2339,"context_line":"            ret \u003d main([broker.db_file, \u0027repair\u0027, \u0027-y\u0027])"},{"line_number":2340,"context_line":"        self.assertEqual(0, ret)"},{"line_number":2341,"context_line":"        err_lines \u003d err.getvalue().split(\u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"87e831be_8361b8b1","line":2338,"range":{"start_line":2338,"start_character":12,"end_line":2338,"end_character":54},"in_reply_to":"cf7912f1_a4e26f1d","updated":"2022-08-19 16:44:41.000000000","message":"Done","commit_id":"c0923ded47663bf677998575055f674729d98223"}]}
