)]}'
{"swift/container/replicator.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"65c5028998990e9b56118c56c7a0c65bd7324330","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                broker.merge_timestamps(*(remote_info[key] for key in"},{"line_number":79,"context_line":"                                          sync_timestamps))"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            if \u0027shard_max_row\u0027 in remote_info:"},{"line_number":82,"context_line":"                # Grab remote\u0027s shard ranges, too"},{"line_number":83,"context_line":"                self._fetch_and_merge_shard_ranges(http, broker)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6e13385d","line":81,"range":{"start_line":81,"start_character":15,"end_line":81,"end_character":45},"updated":"2018-06-13 11:39:17.000000000","message":"while reviewing this I noticed that there was no direct unit test check for the container backend customisation of get_replication_info() i.e. no direct test that shard_max_row is a key (although this seems to be indirectly tested in test_replicator).\n\nwhich caused me to notice this bug: https://review.openstack.org/575084","commit_id":"34437cc339f0b2e30b5df7672195c8cb9a01e780"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"67a4b2aac905edea659d0823c735d5414e29e076","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _choose_replication_mode(self, node, rinfo, info, local_sync, broker,"},{"line_number":104,"context_line":"                                 http, different_region):"},{"line_number":105,"context_line":"        shard_range_success \u003d True"},{"line_number":106,"context_line":"        if \u0027shard_max_row\u0027 in rinfo:"},{"line_number":107,"context_line":"            # Always replicate shard ranges to new-enough swift"},{"line_number":108,"context_line":"            shard_range_success \u003d self._sync_shard_ranges("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5ea132a8","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":34},"updated":"2018-06-14 12:17:35.000000000","message":"I think this should perhaps be False. Apart from the intuitive \u0027success implies shard ranges were replicated\u0027 consider a case when, in the extreme, a single node is upgraded:\n\n- A container is in sync across all replicas.\n- The container is sharded on the upgraded node.\n- Shard ranges cannot be replicated to any other node.\n- A rebalance occurs, the upgraded node becomes an ex-primary.\n- An older node replicates to the new primary.\n- The upgraded still cannot replicate shard ranges to any other node, including the new primary.\n- The upgraded ex-primary node thinks replication has been successful and deletes the db.\n- No replica has shard ranges.\n\nAlso, a warning message might be useful if a non-upgraded peer is detected.\n\nMaybe something like https://gist.github.com/alistairncoles/3a9b9eb909b80e5c24955693d6f37167","commit_id":"cb71c1be2e3e78981f4937266901217f79a8af2f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"28224d7c897e0565cb6fc3a62396a14fa70fdb4b","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def _choose_replication_mode(self, node, rinfo, info, local_sync, broker,"},{"line_number":104,"context_line":"                                 http, different_region):"},{"line_number":105,"context_line":"        shard_range_success \u003d True"},{"line_number":106,"context_line":"        if \u0027shard_max_row\u0027 in rinfo:"},{"line_number":107,"context_line":"            # Always replicate shard ranges to new-enough swift"},{"line_number":108,"context_line":"            shard_range_success \u003d self._sync_shard_ranges("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a1de190e","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":34},"in_reply_to":"5f7c97a3_5ea132a8","updated":"2018-06-15 00:00:27.000000000","message":"Sure. I was torn about it when I wrote it -- I think you\u0027ve made a pretty good case for it defaulting to False.","commit_id":"cb71c1be2e3e78981f4937266901217f79a8af2f"}],"test/unit/container/test_replicator.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"65c5028998990e9b56118c56c7a0c65bd7324330","unresolved":false,"context_lines":[{"line_number":1861,"context_line":"            {\u0027per_diff\u0027: 1})"},{"line_number":1862,"context_line":""},{"line_number":1863,"context_line":"    def _check_only_sync(self, local_broker, remote_node_index, repl_conf,"},{"line_number":1864,"context_line":"                         expected_shard_ranges, expect_success\u003dTrue):"},{"line_number":1865,"context_line":"        # expected_shard_ranges is expected final list of sync\u0027d ranges"},{"line_number":1866,"context_line":"        daemon, repl_calls, rsync_calls \u003d self.check_replicate("},{"line_number":1867,"context_line":"            local_broker, remote_node_index, repl_conf,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_d3131964","line":1864,"range":{"start_line":1864,"start_character":25,"end_line":1864,"end_character":46},"updated":"2018-06-13 11:39:17.000000000","message":"not used","commit_id":"34437cc339f0b2e30b5df7672195c8cb9a01e780"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"65c5028998990e9b56118c56c7a0c65bd7324330","unresolved":false,"context_lines":[{"line_number":1862,"context_line":""},{"line_number":1863,"context_line":"    def _check_only_sync(self, local_broker, remote_node_index, repl_conf,"},{"line_number":1864,"context_line":"                         expected_shard_ranges, expect_success\u003dTrue):"},{"line_number":1865,"context_line":"        # expected_shard_ranges is expected final list of sync\u0027d ranges"},{"line_number":1866,"context_line":"        daemon, repl_calls, rsync_calls \u003d self.check_replicate("},{"line_number":1867,"context_line":"            local_broker, remote_node_index, repl_conf,"},{"line_number":1868,"context_line":"            expect_success\u003dexpect_success)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_730ec53b","line":1865,"range":{"start_line":1865,"start_character":8,"end_line":1865,"end_character":71},"updated":"2018-06-13 11:39:17.000000000","message":"stale comment","commit_id":"34437cc339f0b2e30b5df7672195c8cb9a01e780"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"65c5028998990e9b56118c56c7a0c65bd7324330","unresolved":false,"context_lines":[{"line_number":1867,"context_line":"            local_broker, remote_node_index, repl_conf,"},{"line_number":1868,"context_line":"            expect_success\u003dexpect_success)"},{"line_number":1869,"context_line":""},{"line_number":1870,"context_line":"        # we always expect only shard ranges to end in abort"},{"line_number":1871,"context_line":"        self.assertEqual(1, daemon.stats[\u0027deferred\u0027])"},{"line_number":1872,"context_line":"        self.assertEqual(0, daemon.stats[\u0027diff\u0027])"},{"line_number":1873,"context_line":"        self.assertEqual(0, daemon.stats[\u0027rsync\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_3304cd17","line":1870,"range":{"start_line":1870,"start_character":8,"end_line":1870,"end_character":60},"updated":"2018-06-13 11:39:17.000000000","message":"copied but maybe not applicable?","commit_id":"34437cc339f0b2e30b5df7672195c8cb9a01e780"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"65c5028998990e9b56118c56c7a0c65bd7324330","unresolved":false,"context_lines":[{"line_number":1896,"context_line":""},{"line_number":1897,"context_line":"        orig_get_remote_info \u003d \\"},{"line_number":1898,"context_line":"            replicator.ContainerReplicatorRpc._get_synced_replication_info"},{"line_number":1899,"context_line":"        def presharding_get_remote_info(*args):"},{"line_number":1900,"context_line":"            rinfo \u003d orig_get_remote_info(*args)"},{"line_number":1901,"context_line":"            del rinfo[\u0027shard_max_row\u0027]"},{"line_number":1902,"context_line":"            return rinfo"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b310dd5a","line":1899,"range":{"start_line":1899,"start_character":8,"end_line":1899,"end_character":40},"updated":"2018-06-13 11:39:17.000000000","message":"pep8 will ding you for missing empty line","commit_id":"34437cc339f0b2e30b5df7672195c8cb9a01e780"}]}
