)]}'
{"etc/proxy-server.conf-sample":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"835be4afce2388dd055b4b54da6508c2e479e8d5","unresolved":false,"context_lines":[{"line_number":233,"context_line":"# the default."},{"line_number":234,"context_line":"# e.g."},{"line_number":235,"context_line":"# write_affinity_policy_0 \u003d r1"},{"line_number":236,"context_line":"# write_affinity_policy_1 \u003d r3"},{"line_number":237,"context_line":"#"},{"line_number":238,"context_line":"# The number of local (as governed by the write_affinity setting)"},{"line_number":239,"context_line":"# nodes to attempt to contact first, before any non-local ones. You"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"3a461143_ef24a0b3","line":236,"updated":"2017-02-02 02:51:50.000000000","message":"over time this is going to result in *most* proxy turning options having mirrors with \u0027..._policy_\u003cint\u003e\u0027 after them.\n\nI think this might be a lot easier to do with sections.","commit_id":"5eaeb8ae9e6a6731cbb522c7ccfe0258da5a4286"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e753a8cf643db1268a978bab54a0e4464d0c2939","unresolved":false,"context_lines":[{"line_number":212,"context_line":"# specified for a given policy, the proxy uses \"read_affinity\" setting as"},{"line_number":213,"context_line":"# the default."},{"line_number":214,"context_line":"# e.g."},{"line_number":215,"context_line":"# read_affinity_policy_0 \u003d r1z1\u003d100"},{"line_number":216,"context_line":"# read_affinity_policy_1 \u003d r3\u003d100"},{"line_number":217,"context_line":"#"},{"line_number":218,"context_line":"# Which backend servers to prefer on writes. Format is r\u003cN\u003e for region"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"1a1ced50_bd641322","line":215,"updated":"2017-03-21 19:11:59.000000000","message":"I think Clay commented before...appending policy to option names is going to get messy, and hard to document clearly.","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3acc90ef41a6872e2cc08aaae8bcdcc9402191af","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.container_name \u003d unquote(container_name)"},{"line_number":130,"context_line":"        self.object_name \u003d unquote(object_name)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Yields nodes for a ring partition."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_683040a0","line":132,"range":{"start_line":132,"start_character":8,"end_line":132,"end_character":30},"updated":"2017-04-04 23:05:10.000000000","message":"I couldn\u0027t see where the caller(s) of this method actually set the policy arg - is there somemore plumbing needed ?","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"acb5c97f5a355ed6530c2f7ee6ecfa3a8131694a","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.container_name \u003d unquote(container_name)"},{"line_number":130,"context_line":"        self.object_name \u003d unquote(object_name)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Yields nodes for a ring partition."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_5f165df3","line":132,"updated":"2017-04-04 18:09:31.000000000","message":"If possible I would really like to avoid having to plumb policy through more of the object controller. We could either:\n\n1. make policy a instance variable of an object controller\n or\n\n2. pass the object controller an instance of the proxy server app that is configured per policy, so the app just does the right thing without needing to be passed policy args back from the controller\n\nI have started to experiment with 2 but not quite workign yet!","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3acc90ef41a6872e2cc08aaae8bcdcc9402191af","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        self.container_name \u003d unquote(container_name)"},{"line_number":130,"context_line":"        self.object_name \u003d unquote(object_name)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def iter_nodes_local_first(self, ring, partition, policy\u003dNone):"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        Yields nodes for a ring partition."},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_686280b0","line":132,"in_reply_to":"dfeb2761_5f165df3","updated":"2017-04-04 23:05:10.000000000","message":"Sorry, Ignore my previous comment...\n\nI discovered that idea 2 is hard!\n\nIdea 1 is trivial [1] - in fact there is a lot of unnecessary passing of policy around the controller. But looking at this more, the amount of extra plumbing in this patch is not huge, so probably easiest to leave it as it is. [1] could be basis for a separate patch if we wanted to clean up the controller.\n\n[1] https://gist.github.com/alistairncoles/e0f52f768e537f748528dac07a5f7ca5","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3acc90ef41a6872e2cc08aaae8bcdcc9402191af","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        is_local \u003d self.app.write_affinity_is_local_fn_map[policy]"},{"line_number":149,"context_line":"        if is_local is None:"},{"line_number":150,"context_line":"            return self.app.iter_nodes(ring, partition)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        primary_nodes \u003d ring.get_part_nodes(partition)"},{"line_number":153,"context_line":"        num_locals \u003d self.app.write_affinity_node_count(len(primary_nodes))"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_c8a18c96","line":150,"updated":"2017-04-04 23:05:10.000000000","message":"should we now be passng policy to iter_nodes?","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3acc90ef41a6872e2cc08aaae8bcdcc9402191af","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                             all_nodes))"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        return self.app.iter_nodes("},{"line_number":169,"context_line":"            ring, partition, node_iter\u003dlocal_first_node_iter)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def GETorHEAD(self, req):"},{"line_number":172,"context_line":"        \"\"\"Handle HTTP GET or HEAD requests.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"dfeb2761_68df200d","line":169,"updated":"2017-04-04 23:05:10.000000000","message":"also here - should we pass policy?","commit_id":"8d17cd4eaadcadcbe411000933c25635ebf5f7d8"}]}
