)]}'
{"swift/proxy/controllers/container.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"e5737b6706f5d2867d29c997a8e17f16f6dfaca9","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        account_partition, accounts, container_count \u003d \\"},{"line_number":161,"context_line":"            self.account_info(self.account_name, req)"},{"line_number":162,"context_line":"        if not accounts and self.app.account_autocreate:"},{"line_number":163,"context_line":"            self.autocreate_account(req, self.account_name)"},{"line_number":164,"context_line":"            account_partition, accounts, container_count \u003d \\"},{"line_number":165,"context_line":"                self.account_info(self.account_name, req)"},{"line_number":166,"context_line":"            if not accounts:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_15d6cdc4","line":163,"updated":"2018-01-15 05:24:44.000000000","message":"self.autocreate_account will know if it failed or not, so we could save an extra request (account_info call below [an account GET]) if we make `self.autocreate_account` return a bool we can check against:\n\n  if not self.autocreate_account(req, self.account_name):\n    return HTTPServerError(request\u003dreq)","commit_id":"ebb5aff448aad60e5682540eef5d9c5db53514c8"},{"author":{"_account_id":27641,"name":"cheng li","email":"li.chenga@h3c.com","username":"chenga"},"change_message_id":"603a520aca645039ba61c5a77cfa81370954f2bd","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        account_partition, accounts, container_count \u003d \\"},{"line_number":161,"context_line":"            self.account_info(self.account_name, req)"},{"line_number":162,"context_line":"        if not accounts and self.app.account_autocreate:"},{"line_number":163,"context_line":"            self.autocreate_account(req, self.account_name)"},{"line_number":164,"context_line":"            account_partition, accounts, container_count \u003d \\"},{"line_number":165,"context_line":"                self.account_info(self.account_name, req)"},{"line_number":166,"context_line":"            if not accounts:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_507303b2","line":163,"in_reply_to":"7f96bb07_15d6cdc4","updated":"2018-01-15 05:47:21.000000000","message":"Good idea, I will follow up with another patch.","commit_id":"ebb5aff448aad60e5682540eef5d9c5db53514c8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"89076e578641ead3860c83860225abb9d38c5340","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self.account_info(self.account_name, req)"},{"line_number":162,"context_line":"        if not accounts and self.app.account_autocreate:"},{"line_number":163,"context_line":"            if not self.autocreate_account(req, self.account_name):"},{"line_number":164,"context_line":"                return HTTPServerError(request\u003dreq)"},{"line_number":165,"context_line":"            account_partition, accounts, container_count \u003d \\"},{"line_number":166,"context_line":"                self.account_info(self.account_name, req)"},{"line_number":167,"context_line":"        if not accounts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_01583a85","line":164,"range":{"start_line":164,"start_character":23,"end_line":164,"end_character":38},"updated":"2018-01-18 21:12:17.000000000","message":"I wonder if HTTPServiceUnavailable might be a better choice.\n\nHTTPServerError is most-typically the result of unhandled exceptions; my first instinct on getting that as a response is to go looking for tracebacks in my logs.\n\nOn a 503, though, I\u0027d assume there was some issue talking to the backend servers, which seems more appropriate here...","commit_id":"5cbd5cf303ca085af2a61dbb5b98d1b98099bd7e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"968756f8e5cf51a4bbab71011b67360f88e4ee0c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self.account_info(self.account_name, req)"},{"line_number":162,"context_line":"        if not accounts and self.app.account_autocreate:"},{"line_number":163,"context_line":"            if not self.autocreate_account(req, self.account_name):"},{"line_number":164,"context_line":"                return HTTPServerError(request\u003dreq)"},{"line_number":165,"context_line":"            account_partition, accounts, container_count \u003d \\"},{"line_number":166,"context_line":"                self.account_info(self.account_name, req)"},{"line_number":167,"context_line":"        if not accounts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_32f10602","line":164,"range":{"start_line":164,"start_character":23,"end_line":164,"end_character":38},"in_reply_to":"7f96bb07_01583a85","updated":"2018-01-18 22:32:02.000000000","message":"+1 503 might be slightly more appropriate - I think the current behavior is bad and any 5XX is ok by me","commit_id":"5cbd5cf303ca085af2a61dbb5b98d1b98099bd7e"},{"author":{"_account_id":27641,"name":"cheng li","email":"li.chenga@h3c.com","username":"chenga"},"change_message_id":"d6425b3a5b051bdef01aebd2fda301e2c4dc5474","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            self.account_info(self.account_name, req)"},{"line_number":162,"context_line":"        if not accounts and self.app.account_autocreate:"},{"line_number":163,"context_line":"            if not self.autocreate_account(req, self.account_name):"},{"line_number":164,"context_line":"                return HTTPServerError(request\u003dreq)"},{"line_number":165,"context_line":"            account_partition, accounts, container_count \u003d \\"},{"line_number":166,"context_line":"                self.account_info(self.account_name, req)"},{"line_number":167,"context_line":"        if not accounts:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f96bb07_55011904","line":164,"range":{"start_line":164,"start_character":23,"end_line":164,"end_character":38},"in_reply_to":"7f96bb07_01583a85","updated":"2018-01-19 01:38:37.000000000","message":"As a swift user, I create a container with \"account_autocreate\u003dTrue\".\nIf the server returns 503, I would think the Contanier service is down. But in fact, both the container and account service are up. Seems 503 would confuse the users.\nIf the server returns 500, I may think there is something wrong of the service internal. It does have, the thing is: Creating account fails with \"account_autocreate\u003dTrue\".\nFrom this point of view, seems 500 is reasonable too.","commit_id":"5cbd5cf303ca085af2a61dbb5b98d1b98099bd7e"}]}
