)]}'
{"test/unit/container/test_server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05a2747864ffa68345eaf8e2b86d35d9136f7111","unresolved":false,"context_lines":[{"line_number":2287,"context_line":"        self._put_shard_range(shard_ranges[\u0027happy\u0027])"},{"line_number":2288,"context_line":""},{"line_number":2289,"context_line":"        # TODO: shard ranges exist but broker is not yet in sharding state - we"},{"line_number":2290,"context_line":"        # should probably *not* be redirecting..."},{"line_number":2291,"context_line":"        resp \u003d do_update(\u0027grumpy\u0027)"},{"line_number":2292,"context_line":"        self.assertEqual(301, resp.status_int)"},{"line_number":2293,"context_line":"        self.assertEqual(\u0027http://localhost/.sharded_a/sr_happy/grumpy\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_e6ea4c73","line":2290,"updated":"2017-09-26 17:01:16.000000000","message":"IDK, I think redirecting seems sane. *Someone* thinks we\u0027ve got enough records and started sharding, and even got as far as pushing out the pivots -- this is basically the state we\u0027re in at https://github.com/openstack/swift/blob/0698d6e/test/probe/test_sharder.py#L157-L162\n\nI\u0027m fine with the both:\n- decreasing the amount of work the sharder has to do when it gets to this and\n- getting those records where they belong faster.","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d50a4aefb8f6dcd758f5a33b92fbeb38d802f487","unresolved":false,"context_lines":[{"line_number":2287,"context_line":"        self._put_shard_range(shard_ranges[\u0027happy\u0027])"},{"line_number":2288,"context_line":""},{"line_number":2289,"context_line":"        # TODO: shard ranges exist but broker is not yet in sharding state - we"},{"line_number":2290,"context_line":"        # should probably *not* be redirecting..."},{"line_number":2291,"context_line":"        resp \u003d do_update(\u0027grumpy\u0027)"},{"line_number":2292,"context_line":"        self.assertEqual(301, resp.status_int)"},{"line_number":2293,"context_line":"        self.assertEqual(\u0027http://localhost/.sharded_a/sr_happy/grumpy\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_80cec77f","line":2290,"in_reply_to":"7f515b1d_e6ea4c73","updated":"2017-09-27 09:16:01.000000000","message":"No, here I have not yet set_sharding_state. I want a discussion about when sharding_state *is* set because it seems to happen in several places, but I have a growing feeling that we may have a state in which a shard range has been found but there is not yet any corresponding shard container.[1]\n\nPerhaps that is ok, the redirected updates will fail and land in async pending on an object server - but if so then we should make sure they evenutally come back to the root and not fail for ever.\n\nBut since the root accepts updates[2] where a shard range has not yet been found, it could also accept them for shard ranges that have been found and not yet instantiated as a container?\n\n[1] For example process A is responsible for finding shard ranges and nothing else. process A writes the shard ranges to the db. process B (replicator?) some time later acts upon the shard ranges.\n\n[2] maybe we\u0027ll change that for simplicity","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05a2747864ffa68345eaf8e2b86d35d9136f7111","unresolved":false,"context_lines":[{"line_number":2290,"context_line":"        # should probably *not* be redirecting..."},{"line_number":2291,"context_line":"        resp \u003d do_update(\u0027grumpy\u0027)"},{"line_number":2292,"context_line":"        self.assertEqual(301, resp.status_int)"},{"line_number":2293,"context_line":"        self.assertEqual(\u0027http://localhost/.sharded_a/sr_happy/grumpy\u0027,"},{"line_number":2294,"context_line":"                         resp.headers[\u0027Location\u0027])"},{"line_number":2295,"context_line":"        self.assertEqual(shard_ranges[\u0027happy\u0027].timestamp.internal,"},{"line_number":2296,"context_line":"                         resp.headers[\u0027X-Redirect-Timestamp\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_e9a57f05","line":2293,"range":{"start_line":2293,"start_character":26,"end_line":2293,"end_character":42},"updated":"2017-09-26 17:01:16.000000000","message":"Hold on. Where did this come from? swob magic, I think? In practice, this will rarely if ever be pointing to the right server, yeah?\n\nGood thing we\u0027re only trusting the path over at https://github.com/openstack/swift/blob/0698d6e/swift/obj/updater.py#L328 ... but I still kinda wonder if we should be setting\n\n req.env[\u0027swift.leave_relative_location\u0027] \u003d True\n\naround https://github.com/openstack/swift/blob/0698d6e/swift/container/server.py#L282-L288 (and maybe passing the request to our response?)","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d50a4aefb8f6dcd758f5a33b92fbeb38d802f487","unresolved":false,"context_lines":[{"line_number":2290,"context_line":"        # should probably *not* be redirecting..."},{"line_number":2291,"context_line":"        resp \u003d do_update(\u0027grumpy\u0027)"},{"line_number":2292,"context_line":"        self.assertEqual(301, resp.status_int)"},{"line_number":2293,"context_line":"        self.assertEqual(\u0027http://localhost/.sharded_a/sr_happy/grumpy\u0027,"},{"line_number":2294,"context_line":"                         resp.headers[\u0027Location\u0027])"},{"line_number":2295,"context_line":"        self.assertEqual(shard_ranges[\u0027happy\u0027].timestamp.internal,"},{"line_number":2296,"context_line":"                         resp.headers[\u0027X-Redirect-Timestamp\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b30b5f22","line":2293,"range":{"start_line":2293,"start_character":26,"end_line":2293,"end_character":42},"in_reply_to":"7f515b1d_e9a57f05","updated":"2017-09-27 09:16:01.000000000","message":"ah, good point. https://review.openstack.org/507797\n\nhmmm, now I am also wondering about the leading /","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"05a2747864ffa68345eaf8e2b86d35d9136f7111","unresolved":false,"context_lines":[{"line_number":2391,"context_line":"            self._update_object_put_headers(req)"},{"line_number":2392,"context_line":"            return req.get_response(self.controller)"},{"line_number":2393,"context_line":""},{"line_number":2394,"context_line":"        def get_listing(params\u003d\u0027\u0027):"},{"line_number":2395,"context_line":"            req \u003d Request.blank("},{"line_number":2396,"context_line":"                \u0027/sda1/p/a/c?format\u003djson%s\u0027 % params, method\u003d\u0027GET\u0027)"},{"line_number":2397,"context_line":"            resp \u003d req.get_response(self.controller)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_696e2f96","line":2394,"range":{"start_line":2394,"start_character":24,"end_line":2394,"end_character":33},"updated":"2017-09-26 17:01:16.000000000","message":"Do we ever use this? We probably *should* have some\n\n items\u003dall\n\nqueries... though maybe for a different test?","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d50a4aefb8f6dcd758f5a33b92fbeb38d802f487","unresolved":false,"context_lines":[{"line_number":2391,"context_line":"            self._update_object_put_headers(req)"},{"line_number":2392,"context_line":"            return req.get_response(self.controller)"},{"line_number":2393,"context_line":""},{"line_number":2394,"context_line":"        def get_listing(params\u003d\u0027\u0027):"},{"line_number":2395,"context_line":"            req \u003d Request.blank("},{"line_number":2396,"context_line":"                \u0027/sda1/p/a/c?format\u003djson%s\u0027 % params, method\u003d\u0027GET\u0027)"},{"line_number":2397,"context_line":"            resp \u003d req.get_response(self.controller)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_f37c3784","line":2394,"range":{"start_line":2394,"start_character":24,"end_line":2394,"end_character":33},"in_reply_to":"7f515b1d_696e2f96","updated":"2017-09-27 09:16:01.000000000","message":"nope, good catch. I tried to use it to get deleted items back via the API for the final check of the test, but while we\u0027re in sharding state it is ignored. I added a TODO to query that behaviour [1]\n\n[1] https://github.com/openstack/swift/blob/55485cd1e9d4bebff5e417e1c56afaed95245706/swift/container/server.py#L663-L668","commit_id":"87b89c9d37851bdd287beae8ee5125dcd66b01d8"}]}
