)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5c7b8261c3e3fa44beb36f0d258e247650f76534","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charles Hsu \u003ccharles0126@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-06 16:37:52 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix cand_objs type mismatch in update_deleted()."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I565c45dda8c99d36e24dbf1145f2d2527d593ac0"},{"line_number":10,"context_line":"Closes-Bug: 1503152"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a2fa921_a9042515","line":7,"updated":"2015-10-06 09:08:42.000000000","message":"maybe you could mention \u0027object replicator\u0027 somewhere in the commit message.","commit_id":"64b090d3f0107d8498ec9d02a1bd2fdc513ca84f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4721e3e4260083d311a5b32ce1ac8bf9e651d02","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charles Hsu \u003ccharles0126@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-07 12:07:07 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix replicator intersection excption when sync data to remote regions."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch fixed the excption (AttributeError: \u0027list\u0027 object has no"},{"line_number":10,"context_line":"attribute \u0027intersection\u0027) when replicator try to sync data from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a2fa921_4c076a1c","line":7,"updated":"2015-10-07 09:49:09.000000000","message":"typo \"excption\"","commit_id":"6a184358695d4c902c946c6ae36eca84974936cb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e4721e3e4260083d311a5b32ce1ac8bf9e651d02","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix replicator intersection excption when sync data to remote regions."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch fixed the excption (AttributeError: \u0027list\u0027 object has no"},{"line_number":10,"context_line":"attribute \u0027intersection\u0027) when replicator try to sync data from"},{"line_number":11,"context_line":"handoff to primary partition in more than one remote region."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a2fa921_2703270f","line":9,"updated":"2015-10-07 09:49:09.000000000","message":"typo \"excption\"","commit_id":"6a184358695d4c902c946c6ae36eca84974936cb"}],"swift/obj/replicator.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"88ca54dfdb57405a00b0c583f1eb0e870b9ebdf0","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :param node: the \"dev\" entry for the remote node to sync with"},{"line_number":148,"context_line":"        :param job: information about the partition being synced"},{"line_number":149,"context_line":"        :param suffixes: a list of suffixes which need to be pushed"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :returns: boolean indicating success or failure"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        return self.sync_method(node, job, suffixes, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_4f89aa25","line":150,"updated":"2015-10-07 01:48:15.000000000","message":"I would be happy if you could also fix my bad at this document. Actually sync returns boolean and dictionary :-)","commit_id":"774883c933b521adccc18f885bed9b0a0a54e812"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"44c03139d232118dd86e35e735e6ec33f95e5a08","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :param node: the \"dev\" entry for the remote node to sync with"},{"line_number":148,"context_line":"        :param job: information about the partition being synced"},{"line_number":149,"context_line":"        :param suffixes: a list of suffixes which need to be pushed"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :returns: boolean indicating success or failure"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        return self.sync_method(node, job, suffixes, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_ac41690d","line":150,"in_reply_to":"7a2fa921_4f89aa25","updated":"2015-10-07 04:05:44.000000000","message":"will do","commit_id":"774883c933b521adccc18f885bed9b0a0a54e812"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"88ca54dfdb57405a00b0c583f1eb0e870b9ebdf0","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                            conn.getresponse().read()"},{"line_number":307,"context_line":"                        if node[\u0027region\u0027] !\u003d job[\u0027region\u0027]:"},{"line_number":308,"context_line":"                            synced_remote_regions[node[\u0027region\u0027]] \u003d \\"},{"line_number":309,"context_line":"                                set(candidates.keys())"},{"line_number":310,"context_line":"                    else:"},{"line_number":311,"context_line":"                        failure_devs_info.add((node[\u0027replication_ip\u0027],"},{"line_number":312,"context_line":"                                               node[\u0027device\u0027]))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_4f2d2a45","line":309,"updated":"2015-10-07 01:48:15.000000000","message":"Keeping list instance might be good.\n\nOnce, I wrote replication change around here, I intended to make unique set of objects. However, the \"candidates\" is now a dict instance so .keys() will return absolutely a list consists of unique keys.\n\nIn addition, set() will be make another instance and that will be big set if we have a lot of objects in Swift. That is worse to cause large memory copy for just translation from list into set. (I was told from clayg at that time)\n\nSo, IMO, we can change whole things to use \"list\" instance (it should consist of unique keys tho) and then, we can create the intersection like:\n\n delete_objs \u003d filter(lambda x: x in cand_objs, delete_objs)","commit_id":"774883c933b521adccc18f885bed9b0a0a54e812"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"44c03139d232118dd86e35e735e6ec33f95e5a08","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                            conn.getresponse().read()"},{"line_number":307,"context_line":"                        if node[\u0027region\u0027] !\u003d job[\u0027region\u0027]:"},{"line_number":308,"context_line":"                            synced_remote_regions[node[\u0027region\u0027]] \u003d \\"},{"line_number":309,"context_line":"                                set(candidates.keys())"},{"line_number":310,"context_line":"                    else:"},{"line_number":311,"context_line":"                        failure_devs_info.add((node[\u0027replication_ip\u0027],"},{"line_number":312,"context_line":"                                               node[\u0027device\u0027]))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_0fd40f45","line":309,"updated":"2015-10-07 04:05:44.000000000","message":"Looks good, I\u0027ll apply this.","commit_id":"774883c933b521adccc18f885bed9b0a0a54e812"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"18ffde31d0749e1b144d439ebff57511c17d2f46","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                            conn.getresponse().read()"},{"line_number":307,"context_line":"                        if node[\u0027region\u0027] !\u003d job[\u0027region\u0027]:"},{"line_number":308,"context_line":"                            synced_remote_regions[node[\u0027region\u0027]] \u003d \\"},{"line_number":309,"context_line":"                                candidates.keys()"},{"line_number":310,"context_line":"                    else:"},{"line_number":311,"context_line":"                        failure_devs_info.add((node[\u0027replication_ip\u0027],"},{"line_number":312,"context_line":"                                               node[\u0027device\u0027]))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_e90c283d","line":309,"updated":"2015-10-07 09:21:51.000000000","message":"If we make this just \u0027\u003d candidates\u0027 then the filter below will be faster. Its quicker to lookup in a dict (hash table) than a list.\n\nThat will also save creating the list data structure at all.","commit_id":"6a184358695d4c902c946c6ae36eca84974936cb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4b2bf1ab3886366d18e7254fa4167152038b9bd8","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                    responses.append(success)"},{"line_number":314,"context_line":"                for region, cand_objs in synced_remote_regions.items():"},{"line_number":315,"context_line":"                    if delete_objs is None:"},{"line_number":316,"context_line":"                        delete_objs \u003d cand_objs"},{"line_number":317,"context_line":"                    else:"},{"line_number":318,"context_line":"                        delete_objs \u003d delete_objs.intersection(cand_objs)"},{"line_number":319,"context_line":"            if self.handoff_delete:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_1792c157","side":"PARENT","line":316,"updated":"2015-10-07 19:30:26.000000000","message":"I keep thinking I understand how this worked, but then I loose it - seems like delete_objs would have always been a list - do we somehow only hit the else block when there\u0027s \u003e 2 regions?","commit_id":"47eb6a37f86f29c355297b556c2ff898c98da9b2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4b2bf1ab3886366d18e7254fa4167152038b9bd8","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                            conn.getresponse().read()"},{"line_number":308,"context_line":"                        if node[\u0027region\u0027] !\u003d job[\u0027region\u0027]:"},{"line_number":309,"context_line":"                            synced_remote_regions[node[\u0027region\u0027]] \u003d viewkeys("},{"line_number":310,"context_line":"                                candidates)"},{"line_number":311,"context_line":"                    else:"},{"line_number":312,"context_line":"                        failure_devs_info.add((node[\u0027replication_ip\u0027],"},{"line_number":313,"context_line":"                                               node[\u0027device\u0027]))"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_77a215b0","line":310,"updated":"2015-10-07 19:30:26.000000000","message":"really we never wanted a list, maybe this was because py2.6?","commit_id":"d01cd425094c2e56e4e89dbf3eaf887815dd5b62"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4b2bf1ab3886366d18e7254fa4167152038b9bd8","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                    if delete_objs is None:"},{"line_number":317,"context_line":"                        delete_objs \u003d cand_objs"},{"line_number":318,"context_line":"                    else:"},{"line_number":319,"context_line":"                        delete_objs \u003d delete_objs \u0026 cand_objs"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"            if self.handoff_delete:"},{"line_number":322,"context_line":"                # delete handoff if we have had handoff_delete successes"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_57eb59b0","line":319,"updated":"2015-10-07 19:30:26.000000000","message":"viewkeys objects don\u0027t have an intersection instance method, but they support the set symantic - as long as delete_objs \u0026 cand_objs are either a) a set or b) a viewkeys instance (which is a set like) - this will return a set.\n\nAnd it\u0027ll use all the built-in goodness and efficiency of indexed intersections without having to do a a search.  We only create the one new object (a set) which is exactly the reduced set that we want!","commit_id":"d01cd425094c2e56e4e89dbf3eaf887815dd5b62"}]}
