)]}'
{"swiftclient/service.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8bb0ed53ffbeb72a80721041160d171c26c4c708","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"            )"},{"line_number":1299,"context_line":"            items, headers \u003d get_future_result(cont_stat)"},{"line_number":1300,"context_line":"            if \u0027x-container-meta-quota-count\u0027 in headers:"},{"line_number":1301,"context_line":"                self.container_quota[\u0027quota-count\u0027] \u003d \\"},{"line_number":1302,"context_line":"                    int(headers[\u0027x-container-meta-quota-count\u0027])"},{"line_number":1303,"context_line":"                self.container_quota[\u0027object-count\u0027] \u003d \\"},{"line_number":1304,"context_line":"                    int(headers[\u0027x-container-object-count\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_c81a347d","line":1301,"updated":"2016-01-22 20:27:10.000000000","message":"If we are using multiple containers (for example, when uploading a large object), only one of them can be in our quota cache at a time.","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":8037,"name":"renminmin","email":"rmm0811@gmail.com","username":"renminmin"},"change_message_id":"953e0961f3d1681120dea81ed8a1a1d8002c03bd","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"            )"},{"line_number":1299,"context_line":"            items, headers \u003d get_future_result(cont_stat)"},{"line_number":1300,"context_line":"            if \u0027x-container-meta-quota-count\u0027 in headers:"},{"line_number":1301,"context_line":"                self.container_quota[\u0027quota-count\u0027] \u003d \\"},{"line_number":1302,"context_line":"                    int(headers[\u0027x-container-meta-quota-count\u0027])"},{"line_number":1303,"context_line":"                self.container_quota[\u0027object-count\u0027] \u003d \\"},{"line_number":1304,"context_line":"                    int(headers[\u0027x-container-object-count\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_cef4535c","line":1301,"in_reply_to":"9a68dd71_c81a347d","updated":"2016-01-25 05:24:02.000000000","message":"This scenario confuse me. Why the large object will be uploaded to multiple containers? Do you mean SLO/DLO? \nI think DLO/SLO is the underlevel of quota checking. The quota checking only for the parent container, not segment containers. Actually, I read the shell.py, every request use the a SwiftService object, I don\u0027t think the container_quota variable is an error.","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8bb0ed53ffbeb72a80721041160d171c26c4c708","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"            if err.http_status !\u003d 404:"},{"line_number":1797,"context_line":"                raise"},{"line_number":1798,"context_line":"            elif \u0027quota-count\u0027 in self.container_quota:"},{"line_number":1799,"context_line":"                if (self.container_quota[\u0027quota-count\u0027] \u003c\u003d"},{"line_number":1800,"context_line":"                        self.container_quota[\u0027object-count\u0027]):"},{"line_number":1801,"context_line":"                    res \u003d res.join(\"Container %s count quota: %d, \""},{"line_number":1802,"context_line":"                                   \"object count: %d\""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_e665e9b4","line":1799,"updated":"2016-01-22 20:27:10.000000000","message":"This won\u0027t catch the case where we\u0027re trying to overwrite an object and our quota is already exceeded (either because of propagation delays or the quota was set to be lower than the current state of the container).","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8bb0ed53ffbeb72a80721041160d171c26c4c708","unresolved":false,"context_lines":[{"line_number":1798,"context_line":"            elif \u0027quota-count\u0027 in self.container_quota:"},{"line_number":1799,"context_line":"                if (self.container_quota[\u0027quota-count\u0027] \u003c\u003d"},{"line_number":1800,"context_line":"                        self.container_quota[\u0027object-count\u0027]):"},{"line_number":1801,"context_line":"                    res \u003d res.join(\"Container %s count quota: %d, \""},{"line_number":1802,"context_line":"                                   \"object count: %d\""},{"line_number":1803,"context_line":"                                   % (container,"},{"line_number":1804,"context_line":"                                      self.container_quota[\u0027quota-count\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_a6d4d1bc","line":1801,"range":{"start_line":1801,"start_character":20,"end_line":1801,"end_character":35},"updated":"2016-01-22 20:27:10.000000000","message":"I don\u0027t think this pattern is going to do what you think it will. Something like\n\n  res \u003d []\n  \n  if container-count-quota-exceeded:\n    res.append(container-count-quota-info)\n  \n  if account-bytes-quota-exceeded:\n    res.append(account-bytes-quota-info)\n  \n  if container-bytes-quota-exceeded:\n    res.append(container-bytes-quota-info)\n  \n  return \u0027\\n\u0027.join(res)\n\nis probably more what we want.","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8bb0ed53ffbeb72a80721041160d171c26c4c708","unresolved":false,"context_lines":[{"line_number":1845,"context_line":"        res[\u0027path\u0027] \u003d path"},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"        try:"},{"line_number":1848,"context_line":"            quota_stat \u003d self._check_quota(conn, container, obj, path)"},{"line_number":1849,"context_line":"            if quota_stat and len(quota_stat):"},{"line_number":1850,"context_line":"                raise ClientException(\"Quota is not enough.\\n%s\" % quota_stat)"},{"line_number":1851,"context_line":"        except ClientException as err:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_a8ea60aa","line":1848,"updated":"2016-01-22 20:27:10.000000000","message":"Wait, so now we\u0027re doing 1-3 HEADs before ever even attempting to upload? On *every* upload?\n\nI liked the former approach better: assume everything will work and then investigate if/when things go wrong. I think it\u0027s still worth having a way to check quotas via SwiftService, but it should be called from shell.py when handling a 413.","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":8037,"name":"renminmin","email":"rmm0811@gmail.com","username":"renminmin"},"change_message_id":"953e0961f3d1681120dea81ed8a1a1d8002c03bd","unresolved":false,"context_lines":[{"line_number":1845,"context_line":"        res[\u0027path\u0027] \u003d path"},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"        try:"},{"line_number":1848,"context_line":"            quota_stat \u003d self._check_quota(conn, container, obj, path)"},{"line_number":1849,"context_line":"            if quota_stat and len(quota_stat):"},{"line_number":1850,"context_line":"                raise ClientException(\"Quota is not enough.\\n%s\" % quota_stat)"},{"line_number":1851,"context_line":"        except ClientException as err:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a68dd71_34d53ee7","line":1848,"in_reply_to":"9a68dd71_a8ea60aa","updated":"2016-01-25 05:24:02.000000000","message":"I agree with you. I will update new patchset.","commit_id":"f9f0d7af65b29e3cd9ea04660818689fc7d78ef7"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"d496c726171b5b8215071008167a9d1e12e0988d","unresolved":false,"context_lines":[{"line_number":1782,"context_line":"            container_quota \u003d \\"},{"line_number":1783,"context_line":"                self._get_container_quota(container)"},{"line_number":1784,"context_line":"        except Exception:"},{"line_number":1785,"context_line":"            return \"Cannot get quota information.\""},{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"        res \u003d self.thread_manager.object_dd_pool.submit(self._stat_object,"},{"line_number":1788,"context_line":"                                                        container,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7af24918_586805bb","line":1785,"updated":"2016-03-01 12:12:19.000000000","message":"This is going to be the sole error message, isn\u0027t it? Then it is misleading to the user, because the error is that quota was exceeded, not that it cannot be fetched. I think the correct course of action is to raise something here, catch it in the caller, and then print the original message that tells that quota was exceeded.","commit_id":"1a33e3a235ded7096b2a4c45d4b1e10994b2cce4"}],"swiftclient/shell.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"495cea4dd051c60672387d8ab59915a576378c50","unresolved":false,"context_lines":[{"line_number":930,"context_line":"                                        headers[\u0027x-container-meta-quota-bytes\u0027]"},{"line_number":931,"context_line":"                                    ct_used_bytes \u003d \\"},{"line_number":932,"context_line":"                                        headers[\u0027x-container-bytes-used\u0027]"},{"line_number":933,"context_line":"                                    err_msg +\u003d \"\\nContainer %s Meta Quota-\" \\"},{"line_number":934,"context_line":"                                               \"Bytes: %s, Actual Used-\" \\"},{"line_number":935,"context_line":"                                               \"Bytes: %s\" % \\"},{"line_number":936,"context_line":"                                               (container,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_257be68d","line":933,"range":{"start_line":933,"start_character":48,"end_line":933,"end_character":50},"updated":"2015-12-28 18:55:44.000000000","message":"So if there\u0027s only a container quota (no account quota), there\u0027s a leading newline? Would it maybe be better to append quota info into a list, and do a \u0027\\n\u0027.join(...) at the end?","commit_id":"72e87b3aa313e4073507a53dc0bc666aca402a44"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"495cea4dd051c60672387d8ab59915a576378c50","unresolved":false,"context_lines":[{"line_number":948,"context_line":"                                                ct_quota_count,"},{"line_number":949,"context_line":"                                                ct_obj_count)"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"                            if err_msg !\u003d \"\":"},{"line_number":952,"context_line":"                                output_manager.error(\"%s\" % err_msg)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"                            too_large \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_a5aef6e3","line":951,"range":{"start_line":951,"start_character":31,"end_line":951,"end_character":44},"updated":"2015-12-28 18:55:44.000000000","message":"This should always be true, right? If it isn\u0027t, what kind of errors get displayed to the user?","commit_id":"72e87b3aa313e4073507a53dc0bc666aca402a44"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"495cea4dd051c60672387d8ab59915a576378c50","unresolved":false,"context_lines":[{"line_number":949,"context_line":"                                                ct_obj_count)"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"                            if err_msg !\u003d \"\":"},{"line_number":952,"context_line":"                                output_manager.error(\"%s\" % err_msg)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"                            too_large \u003d False"},{"line_number":955,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_65b48e34","line":952,"range":{"start_line":952,"start_character":32,"end_line":952,"end_character":68},"updated":"2015-12-28 18:55:44.000000000","message":"Or equivalently,\n\n  output_manager.error(err_msg)","commit_id":"72e87b3aa313e4073507a53dc0bc666aca402a44"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"495cea4dd051c60672387d8ab59915a576378c50","unresolved":false,"context_lines":[{"line_number":951,"context_line":"                            if err_msg !\u003d \"\":"},{"line_number":952,"context_line":"                                output_manager.error(\"%s\" % err_msg)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"                            too_large \u003d False"},{"line_number":955,"context_line":"                        else:"},{"line_number":956,"context_line":"                            too_large \u003d (isinstance(error, ClientException) and"},{"line_number":957,"context_line":"                                         error.http_status \u003d\u003d 413)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_e5f5deec","line":954,"range":{"start_line":954,"start_character":28,"end_line":954,"end_character":45},"updated":"2015-12-28 18:55:44.000000000","message":"Eh, I feel like it\u0027d be better to just indent lines 958-961 another level and not touch too_large at all.","commit_id":"72e87b3aa313e4073507a53dc0bc666aca402a44"}]}
