)]}'
{"swift/proxy/controllers/base.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \u0027read_acl\u0027: headers.get(\u0027x-container-read\u0027),"},{"line_number":124,"context_line":"        \u0027write_acl\u0027: headers.get(\u0027x-container-write\u0027),"},{"line_number":125,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":126,"context_line":"        \u0027count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":127,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":128,"context_line":"        \u0027versions\u0027: headers.get(\u0027x-versions-location\u0027),"},{"line_number":129,"context_line":"        \u0027cors\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCq8%3D","line":126,"updated":"2013-02-09 19:59:59.000000000","message":"It\u0027d be a backward-compatibility issue to rename the \"count\" key, here, to \"object_count\" to match what comes out of headers_to_account_info().  But what do you think about adding a new, duplicate key here of that name?\n\n  ...\n  \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),\n  ...\n\nThat way, the key \"object_count\" can be used to get the count of objects regardless of whether the info is for an account or container.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"bec9fd935e71ee47b70df3326bd399a686b28626","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \u0027read_acl\u0027: headers.get(\u0027x-container-read\u0027),"},{"line_number":124,"context_line":"        \u0027write_acl\u0027: headers.get(\u0027x-container-write\u0027),"},{"line_number":125,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":126,"context_line":"        \u0027count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":127,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":128,"context_line":"        \u0027versions\u0027: headers.get(\u0027x-versions-location\u0027),"},{"line_number":129,"context_line":"        \u0027cors\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA7g%3D","line":126,"in_reply_to":"AAAAM3%2F%2FBLg%3D","updated":"2013-02-11 16:50:59.000000000","message":"Well if there\u0027s no backward-compatibility issue, I\u0027d vote for making headers_to_container_info() use the key, \"object_count\" (which I guess would require a corresponding change in redbo\u0027s middleware?).","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"b919d059ba6fb687e442fc69ca734544825bccfc","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \u0027read_acl\u0027: headers.get(\u0027x-container-read\u0027),"},{"line_number":124,"context_line":"        \u0027write_acl\u0027: headers.get(\u0027x-container-write\u0027),"},{"line_number":125,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":126,"context_line":"        \u0027count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":127,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":128,"context_line":"        \u0027versions\u0027: headers.get(\u0027x-versions-location\u0027),"},{"line_number":129,"context_line":"        \u0027cors\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FAwg%3D","line":126,"in_reply_to":"AAAAM3%2F%2FCq8%3D","updated":"2013-02-11 18:02:59.000000000","message":"FYI, object_count is in container and account info so changing object_count as total_object_count for account info to be able to use that value regardless as well.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"c956cfcbb2d2a7e9edc2821cb99918b4d241868c","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \u0027read_acl\u0027: headers.get(\u0027x-container-read\u0027),"},{"line_number":124,"context_line":"        \u0027write_acl\u0027: headers.get(\u0027x-container-write\u0027),"},{"line_number":125,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":126,"context_line":"        \u0027count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":127,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":128,"context_line":"        \u0027versions\u0027: headers.get(\u0027x-versions-location\u0027),"},{"line_number":129,"context_line":"        \u0027cors\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FBLg%3D","line":126,"in_reply_to":"AAAAM3%2F%2FCq8%3D","updated":"2013-02-11 15:19:36.000000000","message":"well that function have only been introduced with redbo\u0027s quota patch (i.e: last week) we can update it since I am 99.9% sure only the container_quota middleware uses it.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"a3e5c319cb7acc3c084730ef23097a9588f23f94","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        \u0027write_acl\u0027: headers.get(\u0027x-container-write\u0027),"},{"line_number":125,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":126,"context_line":"        \u0027count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":127,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":128,"context_line":"        \u0027versions\u0027: headers.get(\u0027x-versions-location\u0027),"},{"line_number":129,"context_line":"        \u0027cors\u0027: {"},{"line_number":130,"context_line":"            \u0027allow_origin\u0027: headers.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA50%3D","line":127,"updated":"2013-02-11 16:57:53.000000000","message":"ok perfect will do.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    cache \u003d cache_from_env(env)"},{"line_number":215,"context_line":"    if not cache:"},{"line_number":216,"context_line":"        return None"},{"line_number":217,"context_line":"    (version, account, container, obj) \u003d \\"},{"line_number":218,"context_line":"        split_path(env[\u0027PATH_INFO\u0027], 2, 4, True)"},{"line_number":219,"context_line":"    cache_key \u003d get_container_memcache_key(account, container)"},{"line_number":220,"context_line":"    # Use a unique environment cache key per container.  If you copy this env"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCoc%3D","line":217,"updated":"2013-02-09 19:59:59.000000000","message":"Shouldn\u0027t the minsegs argument here be 3 instead of 2?  The three segments being \"version\", \"account\" and \"container\"?\n\nAlso, obj isn\u0027t used here, and I like how you did it in get_account_info(), making that be \"_\" instead.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"c956cfcbb2d2a7e9edc2821cb99918b4d241868c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    cache \u003d cache_from_env(env)"},{"line_number":215,"context_line":"    if not cache:"},{"line_number":216,"context_line":"        return None"},{"line_number":217,"context_line":"    (version, account, container, obj) \u003d \\"},{"line_number":218,"context_line":"        split_path(env[\u0027PATH_INFO\u0027], 2, 4, True)"},{"line_number":219,"context_line":"    cache_key \u003d get_container_memcache_key(account, container)"},{"line_number":220,"context_line":"    # Use a unique environment cache key per container.  If you copy this env"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FBLQ%3D","line":217,"in_reply_to":"AAAAM3%2F%2FCoc%3D","updated":"2013-02-11 15:19:36.000000000","message":"that\u0027s correct, I should have catched it during container_quota review.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"def get_account_info(env, app):"},{"line_number":236,"context_line":"    \"\"\""},{"line_number":237,"context_line":"    Get the info structure for a account, based on env and app."},{"line_number":238,"context_line":"    This is useful to middlewares."},{"line_number":239,"context_line":"    \"\"\""},{"line_number":240,"context_line":"    cache \u003d cache_from_env(env)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCq4%3D","line":237,"updated":"2013-02-09 19:59:59.000000000","message":"Should be \"an account\"","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    cache_key \u003d get_account_memcache_key(account)"},{"line_number":246,"context_line":"    # Use a unique environment cache key per account.  If you copy this env"},{"line_number":247,"context_line":"    # to make a new request, it won\u0027t accidentally reuse the old account info"},{"line_number":248,"context_line":"    env_key \u003d \u0027swift.%s\u0027 % cache_key"},{"line_number":249,"context_line":"    if env_key not in env:"},{"line_number":250,"context_line":"        account_info \u003d cache.get(cache_key)"},{"line_number":251,"context_line":"        if not account_info:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCoU%3D","line":248,"updated":"2013-02-09 19:59:59.000000000","message":"Part of me thinks a lot of this method should be refactored with get_container_info(), but part of me just read http://zacharyvoase.com/2013/02/08/copypasta/\n\nSo... I dunno?","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"c956cfcbb2d2a7e9edc2821cb99918b4d241868c","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    cache_key \u003d get_account_memcache_key(account)"},{"line_number":246,"context_line":"    # Use a unique environment cache key per account.  If you copy this env"},{"line_number":247,"context_line":"    # to make a new request, it won\u0027t accidentally reuse the old account info"},{"line_number":248,"context_line":"    env_key \u003d \u0027swift.%s\u0027 % cache_key"},{"line_number":249,"context_line":"    if env_key not in env:"},{"line_number":250,"context_line":"        account_info \u003d cache.get(cache_key)"},{"line_number":251,"context_line":"        if not account_info:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FBKw%3D","line":248,"in_reply_to":"AAAAM3%2F%2FCoU%3D","updated":"2013-02-11 15:19:36.000000000","message":"I had the same feeling when I was doing this patch to start merging those twos together (along headers_to{container,account}) but I guess i went for the more explicit copy and paste since it would add a couple of more if blah: else: etc which I don\u0027t like much either.... so yeah I dunno too :)","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                  or (None, None, None) if it does not exist"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":"        partition, nodes \u003d self.app.account_ring.get_nodes(account)"},{"line_number":370,"context_line":"        account_info \u003d {\u0027status\u0027: 0, \u0027container_count\u0027: None,"},{"line_number":371,"context_line":"                        \u0027object_count\u0027: None, \u0027sync_key\u0027: None,"},{"line_number":372,"context_line":"                        \u0027count\u0027: None, \u0027bytes\u0027: None}"},{"line_number":373,"context_line":"        # 0 \u003d no responses, 200 \u003d found, 404 \u003d not found, -1 \u003d mixed responses"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCoM%3D","line":370,"updated":"2013-02-09 19:59:59.000000000","message":"This dict has a \"count\" key, but the dict returned by headers_to_account_info() does not.\n\nThis discrepancy would be easier to notice if this \"initial\" dict\u0027s static contents were closer to the body of headers_to_account_info().","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                    resp.read()"},{"line_number":407,"context_line":"                    if is_success(resp.status):"},{"line_number":408,"context_line":"                        result_code \u003d HTTP_OK"},{"line_number":409,"context_line":"                        container_count \u003d int("},{"line_number":410,"context_line":"                            resp.getheader(\u0027x-account-container-count\u0027) or 0)"},{"line_number":411,"context_line":"                        account_info.update("},{"line_number":412,"context_line":"                            headers_to_account_info(resp.getheaders()))"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCnk%3D","line":409,"updated":"2013-02-09 19:59:59.000000000","message":"Why not get container_count from account_info after the update? E.g.\n\n  account_info.update(headers_to_account_info(resp.getheaders()))\n  container_count \u003d account_info[\u0027container_count\u0027]\n\nor possibly retaining the 0-defaulting with\n\n  account_info.update(headers_to_account_info(resp.getheaders()))\n  container_count \u003d account_info.get(\u0027container_count\u0027, 0)","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"b41da2a82afd952ac9c5d387802ecd5e9c13af12","unresolved":false,"context_lines":[{"line_number":445,"context_line":"            else:"},{"line_number":446,"context_line":"                cache_timeout \u003d self.app.recheck_account_existence * 0.1"},{"line_number":447,"context_line":"            account_info.update(status\u003dresult_code,"},{"line_number":448,"context_line":"                                container_count\u003dcontainer_count)"},{"line_number":449,"context_line":"            self.app.memcache.set(cache_key,"},{"line_number":450,"context_line":"                                  account_info,"},{"line_number":451,"context_line":"                                  timeout\u003dcache_timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FCng%3D","line":448,"updated":"2013-02-09 19:59:59.000000000","message":"The updating of container_count here appears duplicated with line 411/412 except in the case where account_info[\u0027container_count\u0027] started out None and the requests failed and this line ends up setting it to 0.\n\nWhen/why is the distinction between container_count in the account_info being None or 0 important?  Could account_info[\u0027container_count\u0027] just start out as 0 and then be removed here, leaving this bit like:\n\n  account_info.update(status\u003dresult_code)\n\nStarting account_info[\u0027container_count\u0027] out as 0 would also let you get rid of the container_count variable in here (line 411 or so would just update account_info with the successfully-fetched value).","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"c956cfcbb2d2a7e9edc2821cb99918b4d241868c","unresolved":false,"context_lines":[{"line_number":445,"context_line":"            else:"},{"line_number":446,"context_line":"                cache_timeout \u003d self.app.recheck_account_existence * 0.1"},{"line_number":447,"context_line":"            account_info.update(status\u003dresult_code,"},{"line_number":448,"context_line":"                                container_count\u003dcontainer_count)"},{"line_number":449,"context_line":"            self.app.memcache.set(cache_key,"},{"line_number":450,"context_line":"                                  account_info,"},{"line_number":451,"context_line":"                                  timeout\u003dcache_timeout)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FBJ4%3D","line":448,"in_reply_to":"AAAAM3%2F%2FCng%3D","updated":"2013-02-11 15:19:36.000000000","message":"good idea, will do.","commit_id":"27c359a2357da92b784aa5009d4c02d7b491468f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"0622eb62c8ce741fb1a232eae88673a1559c022d","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                        if result_code \u003d\u003d 0:"},{"line_number":417,"context_line":"                            result_code \u003d HTTP_NOT_FOUND"},{"line_number":418,"context_line":"                        elif result_code !\u003d HTTP_NOT_FOUND:"},{"line_number":419,"context_line":"                            result_code \u003d -1"},{"line_number":420,"context_line":"                    elif resp.status \u003d\u003d HTTP_INSUFFICIENT_STORAGE:"},{"line_number":421,"context_line":"                        self.error_limit(node)"},{"line_number":422,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B8hE%3D","line":419,"updated":"2013-02-13 17:55:42.000000000","message":"what\u0027s the case when 418~419 works?\nresponse for node n is not 404, and response for node n+1 is 404. and in this case, the result code should be -1?","commit_id":"15ac4b74350789499f139004b2cf93219ebf9578"},{"author":{"_account_id":866,"name":"Chmouel Boudjnah","email":"chmouel@chmouel.com","username":"chmouel"},"change_message_id":"7e510b772fe939c641a33d7494cfddf72cc23e60","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                        if result_code \u003d\u003d 0:"},{"line_number":417,"context_line":"                            result_code \u003d HTTP_NOT_FOUND"},{"line_number":418,"context_line":"                        elif result_code !\u003d HTTP_NOT_FOUND:"},{"line_number":419,"context_line":"                            result_code \u003d -1"},{"line_number":420,"context_line":"                    elif resp.status \u003d\u003d HTTP_INSUFFICIENT_STORAGE:"},{"line_number":421,"context_line":"                        self.error_limit(node)"},{"line_number":422,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B8fg%3D","line":419,"in_reply_to":"AAAAM3%2F%2B8hE%3D","updated":"2013-02-13 17:59:42.000000000","message":"I am not too sure about that part but I think it\u0027s outside the scope of this patch?","commit_id":"15ac4b74350789499f139004b2cf93219ebf9578"}]}
