)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1581,"context_line":""},{"line_number":1582,"context_line":"        # We delete as many empty directories as we can."},{"line_number":1583,"context_line":"        # cleanup_ondisk_files() takes care of the hash dirs, and we take"},{"line_number":1584,"context_line":"        # care of the suffix dirs and possibly even the partition dir."},{"line_number":1585,"context_line":"        have_nonempty_suffix \u003d False"},{"line_number":1586,"context_line":"        for suffix_path, suffix in suffixes:"},{"line_number":1587,"context_line":"            have_nonempty_hashdir \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_95dbf61f","side":"PARENT","line":1584,"range":{"start_line":1584,"start_character":38,"end_line":1584,"end_character":69},"updated":"2019-03-19 20:17:05.000000000","message":"So when will the partition dir get cleaned up now? I guess in the reconstructor?\n\nHow does it know whether there are any non-empty suffixes? Does it look on disk, or trust hashes.pkl?","commit_id":"703249d6cbc9ece5c015efe4333d2acf1d403bc0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    return get_policy_string(TMP_BASE, policy_or_index)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"def _unlink_if_present(filename):"},{"line_number":135,"context_line":"    try:"},{"line_number":136,"context_line":"        os.unlink(filename)"},{"line_number":137,"context_line":"    except OSError as err:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_d5197e22","line":134,"range":{"start_line":134,"start_character":4,"end_line":134,"end_character":22},"updated":"2019-03-19 20:17:05.000000000","message":"This is no longer called from anywhere...","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"        if do_listdir:"},{"line_number":1262,"context_line":"            for suff in os.listdir(partition_path):"},{"line_number":1263,"context_line":"                if len(suff) \u003d\u003d 3:"},{"line_number":1264,"context_line":"                    hashes.setdefault(suff, None)"},{"line_number":1265,"context_line":"            modified \u003d True"},{"line_number":1266,"context_line":"            self.logger.debug(\u0027Run listdir on %s\u0027, partition_path)"},{"line_number":1267,"context_line":"        hashes.update((suffix, None) for suffix in recalculate)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_95c5360d","line":1264,"updated":"2019-03-19 20:17:05.000000000","message":"I wonder if we should also be willing to delete items out of hashes based on the listdir result...","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1564,"context_line":""},{"line_number":1565,"context_line":"        partition_path \u003d get_part_path(dev_path, policy, partition)"},{"line_number":1566,"context_line":"        if suffixes is None:"},{"line_number":1567,"context_line":"            suffixes \u003d self.yield_suffixes(device, partition, policy)"},{"line_number":1568,"context_line":"        else:"},{"line_number":1569,"context_line":"            suffixes \u003d ("},{"line_number":1570,"context_line":"                (os.path.join(partition_path, suffix), suffix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_1072b47d","line":1567,"updated":"2019-03-19 20:17:05.000000000","message":"This actually goes to disk to find suffixes, right? Do we have any guard against a suffix existing in hashes.pkl but not on disk? Would that ever get invalidated, or would it hang around basically forever?","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1579,"context_line":""},{"line_number":1580,"context_line":"        # We delete as many empty directories as we can."},{"line_number":1581,"context_line":"        # cleanup_ondisk_files() takes care of the hash dirs, and we take"},{"line_number":1582,"context_line":"        # care of the suffix dirs and invalidate them"},{"line_number":1583,"context_line":"        for suffix_path, suffix in suffixes:"},{"line_number":1584,"context_line":"            found_files \u003d False"},{"line_number":1585,"context_line":"            for object_hash in self._listdir(suffix_path):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_759c4a5d","line":1582,"updated":"2019-03-19 20:17:05.000000000","message":"Given the way this comment is phrased, it still kinda sounds like the suffix dir should be gone if it\u0027s empty...","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1448,"context_line":"            self.testdir, self.existing_device, \u0027objects\u0027, \u00270\u0027,"},{"line_number":1449,"context_line":"            df2_suffix)))"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"        # The empty partition dir is gone"},{"line_number":1452,"context_line":"        self.assertFalse(os.path.exists(os.path.join("},{"line_number":1453,"context_line":"            self.testdir, self.existing_device, \u0027objects\u0027, \u00270\u0027)))"},{"line_number":1454,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_9026a4ba","side":"PARENT","line":1451,"updated":"2019-03-19 20:17:05.000000000","message":"This was the key assertion to close https://bugs.launchpad.net/swift/+bug/1706321, right? Are we sure that we\u0027re still covered?","commit_id":"703249d6cbc9ece5c015efe4333d2acf1d403bc0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1416,"context_line":"                \"1525354556.65758.ts\")))"},{"line_number":1417,"context_line":""},{"line_number":1418,"context_line":"            # Cache the hashes and expire the tombstones"},{"line_number":1419,"context_line":"            self.df_mgr.get_hashes(self.existing_device, \u00270\u0027, [], POLICIES[0])"},{"line_number":1420,"context_line":"            the_time[0] +\u003d 2 * self.df_mgr.reclaim_age"},{"line_number":1421,"context_line":""},{"line_number":1422,"context_line":"            hashes \u003d list(self.df_mgr.yield_hashes("}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_f5291a9b","line":1419,"updated":"2019-03-19 20:17:05.000000000","message":"Should there be an assertion here about hashes.invalid being empty or something? Backing this out makes for a not-super-obvious failure:\n\nTraceback (most recent call last):\n  File \"/vagrant/swift/test/unit/obj/test_diskfile.py\", line 1458, in test_yield_hashes_cleans_up_everything\n    f.read().strip(\u0027\\n\u0027))  # sanity\nAssertionError: \u00276cc\\n3d1\u0027 !\u003d \u00276cc\\n3d1\\n6cc\\n3d1\u0027","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"}],"test/unit/obj/test_reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06088552746e79a10780079f57593a9e42fc6bf7","unresolved":false,"context_lines":[{"line_number":1337,"context_line":""},{"line_number":1338,"context_line":"        # part 2 should be totally empty"},{"line_number":1339,"context_line":"        hash_gen \u003d self.reconstructor._df_router[self.policy].yield_hashes("},{"line_number":1340,"context_line":"            \u0027sda1\u0027, \u00272\u0027, self.policy, suffixes\u003dstub_data.keys())"},{"line_number":1341,"context_line":"        for path, hash_, ts in hash_gen:"},{"line_number":1342,"context_line":"            self.fail(\u0027found %s with %s in %s\u0027 % (hash_, ts, path))"},{"line_number":1343,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_f0ee08b3","line":1340,"updated":"2019-03-19 20:17:05.000000000","message":"So, how certain are we that yield_hashes gets called with all the keys from hashes.pkl?\n\nIn update() we look at hashes... but update_deleted() only passes suffixes that exist on disk...","commit_id":"585bf40cc0d8d88849dcf11d409e8c5a2a202a8d"}]}
