)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":22,"context_line":"  (by checking the mtime of the ring.gz files)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"On an Atom N2800 processor, this patch reduced the CPU usage of the main"},{"line_number":25,"context_line":"object replicator/reconstructor from 70% of a core to 0%."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I2867e2be539f325778e2f044a151fd0773a7c390"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df33271e_3b04204a","line":25,"updated":"2020-03-28 13:48:08.000000000","message":"that sounds excellent!","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"}],"swift/common/daemon.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                if not self.spawned_pids():"},{"line_number":241,"context_line":"                    self.logger.notice(\u0027Finished %s\u0027, os.getpid())"},{"line_number":242,"context_line":"                    break"},{"line_number":243,"context_line":"            time.sleep(self.daemon.WORKERS_HEALTHCHECK_INTERVAL)"},{"line_number":244,"context_line":"        self.daemon.post_multiprocess_run()"},{"line_number":245,"context_line":"        return 0"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_1bff9c34","line":243,"updated":"2020-03-28 13:48:08.000000000","message":"I was probably a little agressive here - my bad :\u0027(","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"54a18d4eeae23fd4091181f0e42012224bfb5e64","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                if not self.spawned_pids():"},{"line_number":241,"context_line":"                    self.logger.notice(\u0027Finished %s\u0027, os.getpid())"},{"line_number":242,"context_line":"                    break"},{"line_number":243,"context_line":"            time.sleep(self.daemon.WORKERS_HEALTHCHECK_INTERVAL)"},{"line_number":244,"context_line":"        self.daemon.post_multiprocess_run()"},{"line_number":245,"context_line":"        return 0"},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_24d63c29","line":243,"updated":"2020-04-03 13:49:30.000000000","message":"again, I feel really bad about this one","commit_id":"804776b3794e137aa2bfa4c8184add9f614e06d2"}],"swift/common/ring/ring.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        :param since: If set, checks if the ring changed since the specified"},{"line_number":433,"context_line":"                      unix timestamp. If unset, checks if the ring changed"},{"line_number":434,"context_line":"                      since its last reload."},{"line_number":435,"context_line":"        :returns: True if the ring on disk has changed, False otherwise"},{"line_number":436,"context_line":"        \"\"\""},{"line_number":437,"context_line":"        mtime \u003d getmtime(self.serialized_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_7bfea837","line":434,"updated":"2020-03-28 13:48:08.000000000","message":"what\u0027s the difference practically speaking?\n\nI guess rings can get automatically reloaded and say \"I haven\u0027t changed\" when really they HAVE changed since the last time a caller cached some value out of it.","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"d8872cdc839bec4915a333d2ae45589571dcfa47","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        :param since: If set, checks if the ring changed since the specified"},{"line_number":433,"context_line":"                      unix timestamp. If unset, checks if the ring changed"},{"line_number":434,"context_line":"                      since its last reload."},{"line_number":435,"context_line":"        :returns: True if the ring on disk has changed, False otherwise"},{"line_number":436,"context_line":"        \"\"\""},{"line_number":437,"context_line":"        mtime \u003d getmtime(self.serialized_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_fe91bd48","line":434,"in_reply_to":"df33271e_7bfea837","updated":"2020-04-01 11:36:49.000000000","message":"It was a bad idea. I rollbacked. I realised that if the operator restored a previous ring, this change would go undetected. Instead, I decided to make the ring mtime public.","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"98d3f7b5fea0fd9e4307fb515062cf0a2a85f70c","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        :param since: If set, checks if the ring changed since the specified"},{"line_number":433,"context_line":"                      unix timestamp. If unset, checks if the ring changed"},{"line_number":434,"context_line":"                      since its last reload."},{"line_number":435,"context_line":"        :returns: True if the ring on disk has changed, False otherwise"},{"line_number":436,"context_line":"        \"\"\""},{"line_number":437,"context_line":"        mtime \u003d getmtime(self.serialized_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_327239ae","line":434,"in_reply_to":"df33271e_fe91bd48","updated":"2020-04-01 12:04:43.000000000","message":"Actually I did revert on that also. There were some corner cases. I\u0027m just using a getmtime() in replicator/reconstructor","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f80ad5ac8b0cd749993549d087c6345b0efe53a2","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            self.load_object_ring(policy)"},{"line_number":269,"context_line":"            if policy.object_ring.has_changed(since\u003dself.rings_last_reload):"},{"line_number":270,"context_line":"                self.rings_last_reload \u003d now"},{"line_number":271,"context_line":"                return self.get_local_devices() \u003d\u003d self.all_local_devices"},{"line_number":272,"context_line":"        else:"},{"line_number":273,"context_line":"            return True"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_526ab0b2","line":271,"updated":"2020-03-27 18:54:04.000000000","message":"if self.get_local_devices() \u003d\u003d self.all_local_devices:\n    return False\n\nyeah? Otherwise, we can mistakenly return true when there\u0027s a new ring for policy 0 that didn\u0027t change any of our assignments, without looking at any other rings (which *may* have changes assignments). Or... no, wait... get_local_devices() surely looks at *all* rings... Would something like\n\nif not any(self.load_object_ring(policy)\n           .has_changed(since\u003dself.rings_last_reload)\n           for policy in self.policies):\n    return True\nself.rings_last_reload \u003d now\nreturn self.get_local_devices() \u003d\u003d self.all_local_devices\n\nmake the intent more clear?","commit_id":"814d16c4e6a0594190d29d3d823c51a6aab3e4d6"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"42dcd6a4803db8bc6fb7c06f57491783b4cd8694","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            self.load_object_ring(policy)"},{"line_number":269,"context_line":"            if policy.object_ring.has_changed(since\u003dself.rings_last_reload):"},{"line_number":270,"context_line":"                self.rings_last_reload \u003d now"},{"line_number":271,"context_line":"                return self.get_local_devices() \u003d\u003d self.all_local_devices"},{"line_number":272,"context_line":"        else:"},{"line_number":273,"context_line":"            return True"},{"line_number":274,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_cf9572e6","line":271,"in_reply_to":"df33271e_526ab0b2","updated":"2020-03-27 23:22:45.000000000","message":"You\"re right, it\u0027s way more clear this way. Done.","commit_id":"814d16c4e6a0594190d29d3d823c51a6aab3e4d6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                   for policy in self.policies):"},{"line_number":270,"context_line":"            return True"},{"line_number":271,"context_line":"        self.rings_last_reload \u003d now"},{"line_number":272,"context_line":"        return self.get_local_devices() \u003d\u003d self.all_local_devices"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def aggregate_recon_update(self):"},{"line_number":275,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_5bf9244b","line":272,"updated":"2020-03-28 13:48:08.000000000","message":"so comparing this big lists burns some cycles, and if the rings have changed we don\u0027t need to do that.  sounds good to me","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"}],"swift/obj/replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f80ad5ac8b0cd749993549d087c6345b0efe53a2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    def _get_my_replication_ips(self):"},{"line_number":208,"context_line":"        my_replication_ips \u003d set()"},{"line_number":209,"context_line":"        ips \u003d whataremyips()"},{"line_number":210,"context_line":"        for policy in self.policies:"},{"line_number":211,"context_line":"            self.load_object_ring(policy)"},{"line_number":212,"context_line":"            for local_dev in [dev for dev in policy.object_ring.devs"},{"line_number":213,"context_line":"                              if dev and dev[\u0027replication_ip\u0027] in ips and"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_d2e9a01a","line":210,"updated":"2020-03-27 18:54:04.000000000","message":"Whoops! I don\u0027t think the old behavior had any bad effects, though -- but it\u0027s still probably better that we don\u0027t include EC-only ip/ports here, huh.","commit_id":"814d16c4e6a0594190d29d3d823c51a6aab3e4d6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.concurrency \u003d int(conf.get(\u0027concurrency\u0027, 1))"},{"line_number":141,"context_line":"        self.replicator_workers \u003d int(conf.get(\u0027replicator_workers\u0027, 0))"},{"line_number":142,"context_line":"        self.policies \u003d [policy for policy in POLICIES"},{"line_number":143,"context_line":"                         if policy.policy_type \u003d\u003d REPL_POLICY]"},{"line_number":144,"context_line":"        self.stats_interval \u003d int(conf.get(\u0027stats_interval\u0027, \u0027300\u0027))"},{"line_number":145,"context_line":"        self.ring_check_interval \u003d int(conf.get(\u0027ring_check_interval\u0027, 15))"},{"line_number":146,"context_line":"        self.next_check \u003d time.time() + self.ring_check_interval"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_bb95d0e6","line":143,"updated":"2020-03-28 13:48:08.000000000","message":"and if we add a new repl policy we HAVE to reload anyway so may as well cache this for the life of the process :+1:","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9b799f1f204b8ac63b471a23f1eef72d875f4187","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                self.rings_last_reload \u003d now"},{"line_number":302,"context_line":"                return self.get_local_devices() \u003d\u003d self.all_local_devices"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            return True"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def get_local_devices(self):"},{"line_number":307,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_1b84bcb0","line":304,"updated":"2020-03-28 13:48:08.000000000","message":"a for: else: doesn\u0027t make sense w/o a break\n\nI think Tim would suggest this should look like the reconstructor (maybe add a base class or mixin?)","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":13852,"name":"Romain LE DISEZ","email":"romain.le-disez@corp.ovh.com","username":"rledisez"},"change_message_id":"d8872cdc839bec4915a333d2ae45589571dcfa47","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                self.rings_last_reload \u003d now"},{"line_number":302,"context_line":"                return self.get_local_devices() \u003d\u003d self.all_local_devices"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            return True"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def get_local_devices(self):"},{"line_number":307,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_7ea5ada1","line":304,"in_reply_to":"df33271e_1b84bcb0","updated":"2020-04-01 11:36:49.000000000","message":"Done","commit_id":"75a2eec1e0fd0aaff7fb0c86bb941f347608af60"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"54a18d4eeae23fd4091181f0e42012224bfb5e64","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.concurrency \u003d int(conf.get(\u0027concurrency\u0027, 1))"},{"line_number":141,"context_line":"        self.replicator_workers \u003d int(conf.get(\u0027replicator_workers\u0027, 0))"},{"line_number":142,"context_line":"        self.policies \u003d [policy for policy in POLICIES"},{"line_number":143,"context_line":"                         if policy.policy_type \u003d\u003d REPL_POLICY]"},{"line_number":144,"context_line":"        self.stats_interval \u003d int(conf.get(\u0027stats_interval\u0027, \u0027300\u0027))"},{"line_number":145,"context_line":"        self.ring_check_interval \u003d int(conf.get(\u0027ring_check_interval\u0027, 15))"},{"line_number":146,"context_line":"        self.next_check \u003d time.time() + self.ring_check_interval"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_c4f670d9","line":143,"updated":"2020-04-03 13:49:30.000000000","message":"this is such a nice little code quality improvement, kudos","commit_id":"804776b3794e137aa2bfa4c8184add9f614e06d2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"54a18d4eeae23fd4091181f0e42012224bfb5e64","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            dump_recon_cache(update, self.rcache, self.logger)"},{"line_number":297,"context_line":"        rings_mtime \u003d [os.path.getmtime(self.load_object_ring("},{"line_number":298,"context_line":"                       policy).serialized_path) for policy in self.policies]"},{"line_number":299,"context_line":"        if self.rings_mtime \u003d\u003d rings_mtime:"},{"line_number":300,"context_line":"            return True"},{"line_number":301,"context_line":"        self.rings_mtime \u003d rings_mtime"},{"line_number":302,"context_line":"        return self.get_local_devices() \u003d\u003d self.all_local_devices"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_e468d488","line":299,"updated":"2020-04-03 13:49:30.000000000","message":"I think this is stable order in practice, but perhaps not by design.\n\nfor polices in self.policies is essentially for key in dict","commit_id":"804776b3794e137aa2bfa4c8184add9f614e06d2"}],"test/unit/__init__.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"54a18d4eeae23fd4091181f0e42012224bfb5e64","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def __init__(self, replicas\u003d3, max_more_nodes\u003d0, part_power\u003d0,"},{"line_number":217,"context_line":"                 base_port\u003d1000):"},{"line_number":218,"context_line":"        self.serialized_path \u003d \u0027/foo/bar/object.ring.gz\u0027"},{"line_number":219,"context_line":"        self._base_port \u003d base_port"},{"line_number":220,"context_line":"        self.max_more_nodes \u003d max_more_nodes"},{"line_number":221,"context_line":"        self._part_shift \u003d 32 - part_power"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_041a1816","line":218,"updated":"2020-04-03 13:49:30.000000000","message":"I wonder if a test that uses multiple FakeRing would ever paper over a bug because two of it\u0027s rings have the same on disk path...","commit_id":"804776b3794e137aa2bfa4c8184add9f614e06d2"}]}
