)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"730ff0f0333be2509f04444831778974d78479f1","unresolved":false,"context_lines":[{"line_number":1042,"context_line":"        return hashed, hashes"},{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"    def __get_hashes(self, device, policy, partition, recalculate\u003dNone,"},{"line_number":1045,"context_line":"                     do_listdir\u003dFalse):"},{"line_number":1046,"context_line":"        \"\"\""},{"line_number":1047,"context_line":"        Get hashes for each suffix dir in a partition.  do_listdir causes it to"},{"line_number":1048,"context_line":"        mistrust the hash cache for suffix existence at the (unexpectedly high)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_6c7c00b5","line":1045,"updated":"2017-03-27 14:44:31.000000000","message":"The new argument order does make sense w.r.t. the path construction, but \nwe already have get_hashes(self, device, partition, suffixes, policy) plus get_diskfile_from_hashe, get_diskfile, yield_hashes, yield_suffixes that all have (self, device, partition, ...,policy) so I think I would prefer to use the same ordering here. i.e.:\n\n  __get_hashes(self, device, partition, policy, recalculate\u003dNone,\n                     do_listdir\u003dFalse)\n\n(originally there was no policy, so when policy was added it was put at end of method existing signatures)","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"62f0310cc25349e006d7cf22512127776b988be1","unresolved":false,"context_lines":[{"line_number":1042,"context_line":"        return hashed, hashes"},{"line_number":1043,"context_line":""},{"line_number":1044,"context_line":"    def __get_hashes(self, device, policy, partition, recalculate\u003dNone,"},{"line_number":1045,"context_line":"                     do_listdir\u003dFalse):"},{"line_number":1046,"context_line":"        \"\"\""},{"line_number":1047,"context_line":"        Get hashes for each suffix dir in a partition.  do_listdir causes it to"},{"line_number":1048,"context_line":"        mistrust the hash cache for suffix existence at the (unexpectedly high)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_4a8d9979","line":1045,"in_reply_to":"ffe62b97_6c7c00b5","updated":"2017-03-29 08:39:02.000000000","message":"Done","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"730ff0f0333be2509f04444831778974d78479f1","unresolved":false,"context_lines":[{"line_number":1048,"context_line":"        mistrust the hash cache for suffix existence at the (unexpectedly high)"},{"line_number":1049,"context_line":"        cost of a listdir."},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"        :param partition_path: absolute path of partition to get hashes for"},{"line_number":1052,"context_line":"        :param recalculate: list of suffixes which should be recalculated when"},{"line_number":1053,"context_line":"                            got"},{"line_number":1054,"context_line":"        :param do_listdir: force existence check for all hashes in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_42bd83d6","line":1051,"updated":"2017-03-27 14:44:31.000000000","message":"the params need updating","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"62f0310cc25349e006d7cf22512127776b988be1","unresolved":false,"context_lines":[{"line_number":1048,"context_line":"        mistrust the hash cache for suffix existence at the (unexpectedly high)"},{"line_number":1049,"context_line":"        cost of a listdir."},{"line_number":1050,"context_line":""},{"line_number":1051,"context_line":"        :param partition_path: absolute path of partition to get hashes for"},{"line_number":1052,"context_line":"        :param recalculate: list of suffixes which should be recalculated when"},{"line_number":1053,"context_line":"                            got"},{"line_number":1054,"context_line":"        :param do_listdir: force existence check for all hashes in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_653a7599","line":1051,"in_reply_to":"ffe62b97_42bd83d6","updated":"2017-03-29 08:39:02.000000000","message":"Done","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"730ff0f0333be2509f04444831778974d78479f1","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        hashed \u003d 0"},{"line_number":1060,"context_line":"        dev_path \u003d self.get_dev_path(device)"},{"line_number":1061,"context_line":"        partition_path \u003d os.path.join(dev_path, get_data_dir(policy),"},{"line_number":1062,"context_line":"                                      str(partition))"},{"line_number":1063,"context_line":"        hashes_file \u003d join(partition_path, HASH_FILE)"},{"line_number":1064,"context_line":"        modified \u003d False"},{"line_number":1065,"context_line":"        orig_hashes \u003d {\u0027valid\u0027: False}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_c7a3e59d","line":1062,"updated":"2017-03-27 14:44:31.000000000","message":"nit: we will have this same construction in several places i.e.:\n\n  partition_path \u003d os.path.join(dev_path, get_data_dir(policy),\n                                      str(partition))\n\nit could be worth a simple helper function get_part_path()?","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"62f0310cc25349e006d7cf22512127776b988be1","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        hashed \u003d 0"},{"line_number":1060,"context_line":"        dev_path \u003d self.get_dev_path(device)"},{"line_number":1061,"context_line":"        partition_path \u003d os.path.join(dev_path, get_data_dir(policy),"},{"line_number":1062,"context_line":"                                      str(partition))"},{"line_number":1063,"context_line":"        hashes_file \u003d join(partition_path, HASH_FILE)"},{"line_number":1064,"context_line":"        modified \u003d False"},{"line_number":1065,"context_line":"        orig_hashes \u003d {\u0027valid\u0027: False}"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_25590dfd","line":1062,"in_reply_to":"ffe62b97_c7a3e59d","updated":"2017-03-29 08:39:02.000000000","message":"I have added a get_part_path() helper to diskfile.py (wondered if it should go in common/utils.py instead ?)\nI have only changed that call in the function I modified, should I instead modify all similar calls in the diskfile module ?","commit_id":"c9651940d48c5a84f6989cf1e0cd63cfd98ae0ce"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cd834a6a95214e9bd59004ffb810a527056fbc65","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"        Get hashes for each suffix dir in a partition.  do_listdir causes it to"},{"line_number":1056,"context_line":"        mistrust the hash cache for suffix existence at the (unexpectedly high)"},{"line_number":1057,"context_line":"        cost of a listdir."},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        :param partition: partition on the device in which the object lives"},{"line_number":1060,"context_line":"        :param policy: the StoragePolicy instance"},{"line_number":1061,"context_line":"        :param recalculate: list of suffixes which should be recalculated when"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_1b2f8988","line":1058,"updated":"2017-03-29 10:31:23.000000000","message":"device is still missing","commit_id":"1da21ac43dc6f11c6ad06dedcf91a93dc35b5e99"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            inv_fh.write(suffix + \"\\n\")"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"def get_part_path(dev_path, policy, partition):"},{"line_number":344,"context_line":"    \"\"\""},{"line_number":345,"context_line":"    Given the device path, policy, and partition, returns the full"},{"line_number":346,"context_line":"    path to the partition"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_9315e7e7","line":343,"updated":"2017-04-10 20:35:07.000000000","message":"well why not devices_path, device, policy, partition!?","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"        \"\"\""},{"line_number":1069,"context_line":"        hashed \u003d 0"},{"line_number":1070,"context_line":"        dev_path \u003d self.get_dev_path(device)"},{"line_number":1071,"context_line":"        partition_path \u003d get_part_path(dev_path, policy, partition)"},{"line_number":1072,"context_line":"        hashes_file \u003d join(partition_path, HASH_FILE)"},{"line_number":1073,"context_line":"        modified \u003d False"},{"line_number":1074,"context_line":"        orig_hashes \u003d {\u0027valid\u0027: False}"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_13df973a","line":1071,"updated":"2017-04-10 20:35:07.000000000","message":"yeah, make it a method and drop the get_dev_path in there!","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":1318,"context_line":"        \"\"\""},{"line_number":1319,"context_line":"        dev_path \u003d self.get_dev_path(device)"},{"line_number":1320,"context_line":"        if not dev_path:"},{"line_number":1321,"context_line":"            raise DiskFileDeviceUnavailable()"},{"line_number":1322,"context_line":"        partition_path \u003d get_part_path(dev_path, policy, partition)"},{"line_number":1323,"context_line":"        if not os.path.exists(partition_path):"},{"line_number":1324,"context_line":"            mkdirs(partition_path)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_d3924f57","line":1321,"updated":"2017-04-10 20:35:07.000000000","message":"i wonder if everywhere we *don\u0027t* already check for this if there\u0027s a risk to TypeError in the join?","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":1323,"context_line":"        if not os.path.exists(partition_path):"},{"line_number":1324,"context_line":"            mkdirs(partition_path)"},{"line_number":1325,"context_line":"        _junk, hashes \u003d tpool_reraise("},{"line_number":1326,"context_line":"            self._get_hashes, device, partition, policy, recalculate\u003dsuffixes)"},{"line_number":1327,"context_line":"        return hashes"},{"line_number":1328,"context_line":""},{"line_number":1329,"context_line":"    def _listdir(self, path):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_f37793d3","line":1326,"updated":"2017-04-10 20:35:07.000000000","message":"This is surprisingly surgical!  I\u0027m surprised the test fallout wasn\u0027t worse - but I suppose most tests are treating the get_hashes call as the public interface and a change to _get_hashes/__get_hashes is in fact just an internal private implementation detail.","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":506,"context_line":"            self.last_reconstruction_count \u003d self.reconstruction_count"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    def _get_hashes(self, device, partition, policy, recalculate\u003dNone,"},{"line_number":509,"context_line":"                    do_listdir\u003dFalse):"},{"line_number":510,"context_line":"        df_mgr \u003d self._df_router[policy]"},{"line_number":511,"context_line":"        hashed, suffix_hashes \u003d tpool_reraise("},{"line_number":512,"context_line":"            df_mgr._get_hashes, device, partition, policy,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_530cffa3","line":509,"updated":"2017-04-10 20:35:07.000000000","message":"well, at a minimum I like the argument ordering better.","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":804,"context_line":"                \u0027suffixes\u0027: suffixes,"},{"line_number":805,"context_line":"                \u0027sync_to\u0027: sync_to,"},{"line_number":806,"context_line":"                \u0027partition\u0027: partition,"},{"line_number":807,"context_line":"                \u0027path\u0027: part_path,"},{"line_number":808,"context_line":"                \u0027hashes\u0027: hashes,"},{"line_number":809,"context_line":"                \u0027policy\u0027: policy,"},{"line_number":810,"context_line":"                \u0027local_dev\u0027: local_dev,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_1310b7a7","line":807,"updated":"2017-04-10 20:35:07.000000000","message":"question the risk of leaving this argument in here if we\u0027re not expected to use it.  At some point the work of breaking up the interface on DiskFile so it\u0027s not so coupled to a path on disk will also for consumers of that interface to breakup their assumption that they\u0027re dealing with path on disk.  \u003cshrug\u003e for now I guess replicated objects are more the target.","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"}],"swift/obj/replicator.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90af9694553b9cd4acf9e8ad4cae03d5c0fab069","unresolved":false,"context_lines":[{"line_number":634,"context_line":"                    jobs.append("},{"line_number":635,"context_line":"                        dict(path\u003djob_path,"},{"line_number":636,"context_line":"                             device\u003dlocal_dev[\u0027device\u0027],"},{"line_number":637,"context_line":"                             obj_path\u003dobj_path,"},{"line_number":638,"context_line":"                             nodes\u003dnodes,"},{"line_number":639,"context_line":"                             delete\u003dlen(nodes) \u003e len(part_nodes) - 1,"},{"line_number":640,"context_line":"                             policy\u003dpolicy,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_f3db13ea","line":637,"updated":"2017-04-10 20:35:07.000000000","message":"look at all these path annotations\n\nAt somepoint we\u0027re going to want to rip them out to keep us honest.","commit_id":"95905b017495ac822a7e6998ae12e2032481d932"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cd834a6a95214e9bd59004ffb810a527056fbc65","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        # partition passed as \u0027str\u0027"},{"line_number":280,"context_line":"        part_dir \u003d diskfile.get_part_path(\u0027/srv/node/sda1\u0027, POLICIES[0], \u0027123\u0027)"},{"line_number":281,"context_line":"        exp_dir \u003d \u0027/srv/node/sda1/objects/123\u0027"},{"line_number":282,"context_line":"        self.assertEqual(part_dir, exp_dir)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        # partition passed as \u0027int\u0027"},{"line_number":285,"context_line":"        part_dir \u003d diskfile.get_part_path(\u0027/srv/node/sdb5\u0027, POLICIES[1], 123)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_fb62a5ad","line":282,"updated":"2017-03-29 10:31:23.000000000","message":"nit: *no need to change this* FYI some people have a slight preference to have the first arg be the expected value, the second be the actual value - for some test runners it makes more sense when the fail message is generated. But throughout swift we have a mixture and we cannot and do not enforce this order. If possible use the same order as the context when adding an assertion to a test.","commit_id":"1da21ac43dc6f11c6ad06dedcf91a93dc35b5e99"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cd834a6a95214e9bd59004ffb810a527056fbc65","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        # partition passed as \u0027int\u0027"},{"line_number":285,"context_line":"        part_dir \u003d diskfile.get_part_path(\u0027/srv/node/sdb5\u0027, POLICIES[1], 123)"},{"line_number":286,"context_line":"        exp_dir \u003d \u0027/srv/node/sdb5/objects-1/123\u0027"},{"line_number":287,"context_line":"        self.assertEqual(part_dir, exp_dir)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"@patch_policies"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_7bfb35c0","line":287,"updated":"2017-03-29 10:31:23.000000000","message":"+1 tests two policies and int/str partition","commit_id":"1da21ac43dc6f11c6ad06dedcf91a93dc35b5e99"}]}
