)]}'
{"swift/container/sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1ae90d2128a17cbadeb06d0401b55579ea1218fd","unresolved":false,"context_lines":[{"line_number":917,"context_line":""},{"line_number":918,"context_line":"        def get_max_count(items):"},{"line_number":919,"context_line":"            max_count \u003d max(items.items(), key\u003dlambda x: x[1])"},{"line_number":920,"context_line":"            return filter(lambda x: x[1] \u003d\u003d max_count[1], items.items())"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"        scanner_id \u003d min(get_max_count(obj_counts))[0]"},{"line_number":923,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_d559595a","line":920,"updated":"2017-09-13 05:49:19.000000000","message":"Do we really need the list? How about just\n\n return max(items.items(), key\u003dlambda x: (x[1], x[0]))\n\nand we just get the one result?","commit_id":"5ea6c5d0027f74d77b662b89621268f9a483b376"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1ae90d2128a17cbadeb06d0401b55579ea1218fd","unresolved":false,"context_lines":[{"line_number":934,"context_line":""},{"line_number":935,"context_line":"                # We need to make sure there isn\u0027t a tie, if there is we want"},{"line_number":936,"context_line":"                # to bail and let replication decide"},{"line_number":937,"context_line":"                if len(max_ids) \u003e 1:"},{"line_number":938,"context_line":"                    self.logger.warn(\"Cannot find a scanner node, too many \""},{"line_number":939,"context_line":"                                     \"potential scanners nodes (%s). \""},{"line_number":940,"context_line":"                                     \"Leaving for replication to \""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f2577a7_f571f5df","line":937,"updated":"2017-09-13 05:49:19.000000000","message":"Do we still have to bail on a tie? Why not take\n\n min(max_ids)[0]\n\nlike above (or have get_max_count return one and only one node)? As this is, I\u0027m worried that if we have all three nodes in sync, they\u0027ll all have the same count, and none of them will do the POST...","commit_id":"5ea6c5d0027f74d77b662b89621268f9a483b376"}]}
