)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"52311405499f6d864aec8242a4f9252b5fa1a4da","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9b1987c8_0f696ef3","updated":"2023-05-17 16:27:54.000000000","message":"recheck","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d56a6e4487c7f85042a364a4b1570f7371b17602","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"f186c3e6_1224bde4","updated":"2023-05-19 13:59:05.000000000","message":"recheck\n\nunrelated probe test failure","commit_id":"763653f55ee619c769715f1fa08ae873e4414752"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a5c4c9a228eb8ec85157d7dbad2edeb9cd1d734d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"14aaa26b_657f4f87","updated":"2023-05-30 23:51:50.000000000","message":"recheck\n\nLooks like an eventual-consistency issue in expirer listings.","commit_id":"49a5293cbd7d731eba816aebec47ffe65066dc51"}],"swift/common/memcached.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f6899a87a0db5312d59e779a6fcbd0fe64ed1f1","unresolved":true,"context_lines":[{"line_number":279,"context_line":"        if isinstance(e, MemcacheIncrNotFoundError):"},{"line_number":280,"context_line":"            # we suspect that these errors are due to our code being slow"},{"line_number":281,"context_line":"            # rather than a server problem, so don\u0027t error limit the server"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        if self._error_limit_time \u003c\u003d 0 or self._error_limit_duration \u003c\u003d 0:"},{"line_number":285,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff8a13dc_85fe03a2","line":282,"updated":"2023-05-09 18:35:33.000000000","message":"needs unit test coverage","commit_id":"8b788737c465475686caec3138eddce28f57e509"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"52311405499f6d864aec8242a4f9252b5fa1a4da","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        if isinstance(e, MemcacheIncrNotFoundError):"},{"line_number":280,"context_line":"            # we suspect that these errors are due to our code being slow"},{"line_number":281,"context_line":"            # rather than a server problem, so don\u0027t error limit the server"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        if self._error_limit_time \u003c\u003d 0 or self._error_limit_duration \u003c\u003d 0:"},{"line_number":285,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"6f86d7af_f73e1841","line":282,"in_reply_to":"ff8a13dc_85fe03a2","updated":"2023-05-17 16:27:54.000000000","message":"Done","commit_id":"8b788737c465475686caec3138eddce28f57e509"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f7c078fd9dbf4a0189462824ccd54386bebd2cda","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    pass"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"class MemcacheIncrNotFoundError(MemcacheConnectionError):"},{"line_number":134,"context_line":"    pass"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1315b6e0_a34eef83","line":133,"updated":"2023-05-18 02:05:39.000000000","message":"This new exception\u0027s root cause is not connection, but it inherits from MemcacheConnectionError, then it can be handled inside \"_exception_occurred\".","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f7c078fd9dbf4a0189462824ccd54386bebd2cda","unresolved":true,"context_lines":[{"line_number":279,"context_line":"            self._return_conn(server, None, None)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        if isinstance(e, MemcacheIncrNotFoundError):"},{"line_number":282,"context_line":"            # we suspect that these errors are due to incr code being slow"},{"line_number":283,"context_line":"            # rather than a server problem, so don\u0027t error limit the server"},{"line_number":284,"context_line":"            return"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5c02e8c2_acb6fcb9","line":282,"updated":"2023-05-18 02:05:39.000000000","message":"it\u0027s proved now, so remove \"suspect\"? :-)","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"8337cc8bfdb9ae1d408ec90ea111460ef8ec4bd9","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            self._return_conn(server, None, None)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        if isinstance(e, MemcacheIncrNotFoundError):"},{"line_number":282,"context_line":"            # we suspect that these errors are due to incr code being slow"},{"line_number":283,"context_line":"            # rather than a server problem, so don\u0027t error limit the server"},{"line_number":284,"context_line":"            return"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"11b9bf8e_904e47f1","line":282,"in_reply_to":"5c02e8c2_acb6fcb9","updated":"2023-05-22 14:00:32.000000000","message":"Done","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f7c078fd9dbf4a0189462824ccd54386bebd2cda","unresolved":true,"context_lines":[{"line_number":506,"context_line":"                    if new_val is None:"},{"line_number":507,"context_line":"                        new_val \u003d self._add(fp, sock, hash_key, add_val,"},{"line_number":508,"context_line":"                                            timeout)"},{"line_number":509,"context_line":"                    if new_val is None:"},{"line_number":510,"context_line":"                        new_val \u003d self._incr(fp, sock, command, hash_key,"},{"line_number":511,"context_line":"                                             delta_val)"},{"line_number":512,"context_line":"                    if new_val is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"bb46e4f8_98fe4239","line":509,"updated":"2023-05-18 02:05:39.000000000","message":"For normal path which first _incr succeeds, line 509 and line 512 will also be checked again. This new style is okay to me, but I am a little lean toward to use original style.","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"8337cc8bfdb9ae1d408ec90ea111460ef8ec4bd9","unresolved":false,"context_lines":[{"line_number":506,"context_line":"                    if new_val is None:"},{"line_number":507,"context_line":"                        new_val \u003d self._add(fp, sock, hash_key, add_val,"},{"line_number":508,"context_line":"                                            timeout)"},{"line_number":509,"context_line":"                    if new_val is None:"},{"line_number":510,"context_line":"                        new_val \u003d self._incr(fp, sock, command, hash_key,"},{"line_number":511,"context_line":"                                             delta_val)"},{"line_number":512,"context_line":"                    if new_val is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"aa1cb33b_138f25af","line":509,"in_reply_to":"bb46e4f8_98fe4239","updated":"2023-05-22 14:00:32.000000000","message":"Done","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4db4b463f72d23de8b6cd51b2cacdfb8b03fa5f5","unresolved":true,"context_lines":[{"line_number":507,"context_line":"                        line \u003d fp.readline().strip().split()"},{"line_number":508,"context_line":"                        if line[0].upper() \u003d\u003d b\u0027NOT_STORED\u0027:"},{"line_number":509,"context_line":"                            sock.sendall(b\u0027 \u0027.join(["},{"line_number":510,"context_line":"                                cmd.command, cmd.hash_key, delta]) + b\u0027\\r\\n\u0027)"},{"line_number":511,"context_line":"                            line \u003d fp.readline().strip().split()"},{"line_number":512,"context_line":"                            ret \u003d int(line[0].strip())"},{"line_number":513,"context_line":"                        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"a053522f_c34fa0ca","side":"PARENT","line":510,"range":{"start_line":510,"start_character":32,"end_line":510,"end_character":43},"updated":"2023-05-23 07:15:10.000000000","message":"I guess this could be a decr somehow (like it could be on 499). But we still call _incr in the new code, although that doesn\u0027t actually use the incr instread the cmd.command.","commit_id":"f714f43c90ec6666edaf1ebedec9294d7b6d304e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4db4b463f72d23de8b6cd51b2cacdfb8b03fa5f5","unresolved":true,"context_lines":[{"line_number":475,"context_line":"                \"No memcached connections succeeded.\")"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _incr(self, fp, sock, cmd, delta):"},{"line_number":478,"context_line":"        sock.sendall(b\u0027 \u0027.join([cmd.command, cmd.hash_key, delta]) + b\u0027\\r\\n\u0027)"},{"line_number":479,"context_line":"        line \u003d fp.readline().strip().split()"},{"line_number":480,"context_line":"        if not line:"},{"line_number":481,"context_line":"            raise MemcacheConnectionError(\u0027incomplete read\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"73560432_cecf517f","line":478,"range":{"start_line":478,"start_character":32,"end_line":478,"end_character":43},"updated":"2023-05-23 07:15:10.000000000","message":"So this cmd.command could be something other then incr? seems to suggest that in the old code as it could be decr... so the _incr method name here could I guess optionally also deal with decr?","commit_id":"763653f55ee619c769715f1fa08ae873e4414752"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3ed314f6e1b0037ce5801f33bdcaa6fb4448313f","unresolved":true,"context_lines":[{"line_number":475,"context_line":"                \"No memcached connections succeeded.\")"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _incr(self, fp, sock, cmd, delta):"},{"line_number":478,"context_line":"        sock.sendall(b\u0027 \u0027.join([cmd.command, cmd.hash_key, delta]) + b\u0027\\r\\n\u0027)"},{"line_number":479,"context_line":"        line \u003d fp.readline().strip().split()"},{"line_number":480,"context_line":"        if not line:"},{"line_number":481,"context_line":"            raise MemcacheConnectionError(\u0027incomplete read\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"73958eae_5d38f63a","line":478,"range":{"start_line":478,"start_character":32,"end_line":478,"end_character":43},"in_reply_to":"73560432_cecf517f","updated":"2023-05-23 13:06:09.000000000","message":"fair point, I could rename this _incr_or_decr","commit_id":"763653f55ee619c769715f1fa08ae873e4414752"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"87162a4dec4ff0830302c2db4f23a30ea9f37f9f","unresolved":false,"context_lines":[{"line_number":475,"context_line":"                \"No memcached connections succeeded.\")"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def _incr(self, fp, sock, cmd, delta):"},{"line_number":478,"context_line":"        sock.sendall(b\u0027 \u0027.join([cmd.command, cmd.hash_key, delta]) + b\u0027\\r\\n\u0027)"},{"line_number":479,"context_line":"        line \u003d fp.readline().strip().split()"},{"line_number":480,"context_line":"        if not line:"},{"line_number":481,"context_line":"            raise MemcacheConnectionError(\u0027incomplete read\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"38ac357a_528ae970","line":478,"range":{"start_line":478,"start_character":32,"end_line":478,"end_character":43},"in_reply_to":"73958eae_5d38f63a","updated":"2023-05-24 05:58:01.000000000","message":"Done","commit_id":"763653f55ee619c769715f1fa08ae873e4414752"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5762b569d38823e0ec10b143a5ecac5788d36238","unresolved":true,"context_lines":[{"line_number":483,"context_line":"            return None"},{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1b1f9715_f1a6a959","line":486,"updated":"2023-05-24 15:01:34.000000000","message":"Do we actually need the exception handling? It wasn\u0027t present in the original... Why do we want a `MemcacheConnectionError` instead of a `ValueError`? (That *is* the only exception we\u0027re expecting, right?)\n\nI guess maybe to get that `time_spent` in the log message? I wonder if it would be better for us to include that (and the `method`) in the generic exception handler...","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b652ec5068ab1c773f28f736c91671ae5ec43729","unresolved":true,"context_lines":[{"line_number":483,"context_line":"            return None"},{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"}],"source_content_type":"text/x-python","patch_set":7,"id":"e28fc1a6_3e4112e7","line":486,"in_reply_to":"1b1f9715_f1a6a959","updated":"2023-05-25 11:53:04.000000000","message":"It wasn\u0027t in the original, which is why we got a traceback when \u0027NOT_FOUND\u0027 was returned.\n\nNow that \u0027NOT_FOUND\u0027 is handled more gracefully, I figured that we should be defensive against other unexpected response. Raising a ValueError would result in a traceback vs MemcacheConnectionError which results in just an error log.","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"37914f02006bdd45c0189219dedd84d95298e4a8","unresolved":true,"context_lines":[{"line_number":483,"context_line":"            return None"},{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"}],"source_content_type":"text/x-python","patch_set":7,"id":"f6e2b93f_16f998e9","line":486,"in_reply_to":"3252b1ee_f8306ded","updated":"2023-05-26 15:05:04.000000000","message":"OIC. I guess that makes sense. I\u0027ll back it out.\n\nMaybe I\u0027ll add the extra exception logging (method, timing) is a follow-on - just keep this patch to fixing the NOT_FOUND bug","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9823273b4a5e3239b63b829b1ff49eba1b68a660","unresolved":true,"context_lines":[{"line_number":483,"context_line":"            return None"},{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3252b1ee_f8306ded","line":486,"in_reply_to":"e28fc1a6_3e4112e7","updated":"2023-05-25 15:50:10.000000000","message":"My point was more that nothing else in this module tries to handle unexpected responses in a way that would suppress the traceback. I don\u0027t think *anything* handles any of [the documented standard errors](https://github.com/memcached/memcached/blob/e0e415b7b2b43a6ddd01a9c3ad45fb46358d526b/doc/protocol.txt#L156-L179), for example.\n\nAnd as much as we don\u0027t want to see tracebacks in logs, it\u0027s because *we actually go searching for tracebacks in logs* -- if we had this kind of error handling before, I\u0027m not convinced that we would have ever noticed the `Error handling response: [b\u0027NOT_FOUND\u0027]` line...\n\nCan we at least scope the exception handling down to just looking for `ValueError`? I share Pete\u0027s general distaste for `except Exception:`","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5762b569d38823e0ec10b143a5ecac5788d36238","unresolved":true,"context_lines":[{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"},{"line_number":490,"context_line":"        sock.sendall(b\u0027 \u0027.join(["}],"source_content_type":"text/x-python","patch_set":7,"id":"23216fd9_5fa0404c","line":487,"range":{"start_line":487,"start_character":68,"end_line":487,"end_character":77},"updated":"2023-05-24 15:01:34.000000000","message":"Assuming we *do* want to keep this translation, I think you meant to have\n```\nraise MemcacheConnectionError(\u0027Error handling response: %s\u0027 % line[0])\n```","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b652ec5068ab1c773f28f736c91671ae5ec43729","unresolved":true,"context_lines":[{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"},{"line_number":490,"context_line":"        sock.sendall(b\u0027 \u0027.join(["}],"source_content_type":"text/x-python","patch_set":7,"id":"6b5a9c20_aaac0201","line":487,"range":{"start_line":487,"start_character":68,"end_line":487,"end_character":77},"in_reply_to":"23216fd9_5fa0404c","updated":"2023-05-25 11:53:04.000000000","message":"good catch\n\n@Tim do you think line[0] vs line is important? - I\u0027d opted to include everything since it is unexpected","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9823273b4a5e3239b63b829b1ff49eba1b68a660","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        try:"},{"line_number":485,"context_line":"            return int(line[0].strip())"},{"line_number":486,"context_line":"        except Exception:"},{"line_number":487,"context_line":"            raise MemcacheConnectionError(\u0027Error handling response: %s\u0027, line)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def _add(self, fp, sock, cmd, add_val, timeout):"},{"line_number":490,"context_line":"        sock.sendall(b\u0027 \u0027.join(["}],"source_content_type":"text/x-python","patch_set":7,"id":"8804ba7f_8338f508","line":487,"range":{"start_line":487,"start_character":68,"end_line":487,"end_character":77},"in_reply_to":"6b5a9c20_aaac0201","updated":"2023-05-25 15:50:10.000000000","message":"Meh, not really -- both are good. Now that I think about it, it bugs me a little that we don\u0027t have the original (un`split()`ed) response from the server, but w/e...","commit_id":"dd32b876fb8133ad48fd761d8456592be5f6defe"}],"test/unit/common/test_memcached.py":[{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"f7c078fd9dbf4a0189462824ccd54386bebd2cda","unresolved":false,"context_lines":[{"line_number":1412,"context_line":"        self.assertIn(\u0027Error talking to memcached: 1.2.3.4:11211: \u0027,"},{"line_number":1413,"context_line":"                      error_logs[0])"},{"line_number":1414,"context_line":"        self.assertIn(\u0027with key_prefix shard-updating-v2/acc, method incr, \u0027"},{"line_number":1415,"context_line":"                      \u0027time_spent 1.0, expired ttl\u003d1.23\u0027,"},{"line_number":1416,"context_line":"                      error_logs[0])"},{"line_number":1417,"context_line":"        self.assertIn(\u00271.2.3.4:11211\u0027, memcache_client._errors)"},{"line_number":1418,"context_line":"        self.assertFalse(memcache_client._errors[\u00271.2.3.4:11211\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"08e99e82_a6fdf053","line":1415,"updated":"2023-05-18 02:05:39.000000000","message":"okay, here proves that MemcacheIncrNotFoundError happened.","commit_id":"df857563dfe8bc19440c9628a8a2c875ed9753e0"}]}
