)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d9cd075356156c43159e5a2cb8e468cddbaa589c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f1cb0249_c0feb552","updated":"2023-08-14 21:43:26.000000000","message":"recheck numerous unrelated failures, ci load or network connectivity related","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"402ddb80e4d948b6081ecc3fc2bf3b347ec5d273","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f31232a1_fd9d21dd","updated":"2023-08-15 21:23:21.000000000","message":"recheck more sample data needed","commit_id":"c7d88ff8779bacb272d66ae75f0cd14c0d60e707"}],"ironic/conf/database.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a147b73d6c238dd6819ef7f8001256159fadf9c1","unresolved":true,"context_lines":[{"line_number":26,"context_line":"                help\u003d_(\u0027If SQLite database operation retry logic is enabled \u0027"},{"line_number":27,"context_line":"                       \u0027or not. Enabled by default.\u0027)),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027sqlite_max_wait_for_retry\u0027,"},{"line_number":29,"context_line":"               default\u003d30,"},{"line_number":30,"context_line":"               help\u003d_(\u0027Maximum number of seconds to retry SQLite database \u0027"},{"line_number":31,"context_line":"                      \u0027locks, after which the original exception will be \u0027"},{"line_number":32,"context_line":"                      \u0027returned to the caller.\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"a4857c0c_75a85510","line":29,"updated":"2023-08-16 08:25:06.000000000","message":"Let\u0027s reduce this. 30 seconds is simply not helpful, even when it\u0027s a total wait time (we\u0027re going to hit I/O timeouts on the caller side anyway).","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"                help\u003d_(\u0027If SQLite database operation retry logic is enabled \u0027"},{"line_number":27,"context_line":"                       \u0027or not. Enabled by default.\u0027)),"},{"line_number":28,"context_line":"    cfg.IntOpt(\u0027sqlite_max_wait_for_retry\u0027,"},{"line_number":29,"context_line":"               default\u003d30,"},{"line_number":30,"context_line":"               help\u003d_(\u0027Maximum number of seconds to retry SQLite database \u0027"},{"line_number":31,"context_line":"                      \u0027locks, after which the original exception will be \u0027"},{"line_number":32,"context_line":"                      \u0027returned to the caller.\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"78fbad4f_9c12c2e1","line":29,"in_reply_to":"a4857c0c_75a85510","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"85a941c16b4392f42a4fde9ac9c7cd1cbb8a3051","unresolved":true,"context_lines":[{"line_number":29,"context_line":"               default\u003d10,"},{"line_number":30,"context_line":"               help\u003d_(\u0027Maximum number of seconds to retry SQLite database \u0027"},{"line_number":31,"context_line":"                      \u0027locks, after which the original exception will be \u0027"},{"line_number":32,"context_line":"                      \u0027returned to the caller.\u0027)),"},{"line_number":33,"context_line":"]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3cbc78c6_4dc93024","line":32,"updated":"2023-08-16 17:06:17.000000000","message":"This explanation is no longer consistent with behavior: this timeout is not respected in all cases anymore.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"               default\u003d10,"},{"line_number":30,"context_line":"               help\u003d_(\u0027Maximum number of seconds to retry SQLite database \u0027"},{"line_number":31,"context_line":"                      \u0027locks, after which the original exception will be \u0027"},{"line_number":32,"context_line":"                      \u0027returned to the caller.\u0027)),"},{"line_number":33,"context_line":"]"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5dda9205_350a2529","line":32,"in_reply_to":"3cbc78c6_4dc93024","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"}],"ironic/db/sqlalchemy/api.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d391840ac1dd949f4ed71b941766fa301f8f8740","unresolved":true,"context_lines":[{"line_number":83,"context_line":"                ),"},{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":1,"id":"46ebd5ec_751f9337","line":86,"updated":"2023-08-15 06:54:36.000000000","message":"I\u0027m not sure what you\u0027re doing here. With this multiplier, the first retry is 0.5 * 2**0, i.e. 0.5 seconds. The minimum of 0.25 is meaningless.\n\nOr do you expect it to apply to jitter? A reasonable thing to assume, but per code it does not work this way: https://github.com/jd/tenacity/blob/main/tenacity/wait.py#L192-L194. As you can see, the minimum is not applied at the jitter stage :(\n\nWe could use https://github.com/jd/tenacity/blob/main/tenacity/wait.py#L197 that seems to add jitter to the result instead of using uniform(0, result). We could also consider using a smaller exponent.","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                ),"},{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":1,"id":"855e2cc7_0e453d3f","line":86,"in_reply_to":"37c2ae29_38e60a9f","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"06542fc2d5bcf20961391d1c1bb3f1a7a7aab720","unresolved":true,"context_lines":[{"line_number":83,"context_line":"                ),"},{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":1,"id":"52943904_61ad34aa","line":86,"in_reply_to":"46ebd5ec_751f9337","updated":"2023-08-15 13:54:37.000000000","message":"So the logs from nordix has retries at 0.01 seconds, which caused me to suspect we should move the minimum to .5 seconds.\n\nHmm... ugh, Tenacity why you no do what I want 😭","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5774fd7f9fcd961b3ce544098ced9b4425ebad55","unresolved":true,"context_lines":[{"line_number":83,"context_line":"                ),"},{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":1,"id":"37c2ae29_38e60a9f","line":86,"in_reply_to":"52943904_61ad34aa","updated":"2023-08-15 19:10:01.000000000","message":"And the silly thing is, I actually wanted to use wait_exponential_jitter, and somehow I ended up using wait_full_jitter... sigh","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d391840ac1dd949f4ed71b941766fa301f8f8740","unresolved":true,"context_lines":[{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"},{"line_number":90,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":1,"id":"96c45aa6_8f77dc7c","line":87,"updated":"2023-08-15 06:54:36.000000000","message":"Btw we definitely need to reduce this: https://opendev.org/openstack/ironic/src/branch/master/ironic/conf/database.py#L28-L31. Waiting 30 seconds for a database requests means 1) the database is hopelessly locked, 2) the incoming call will timeout anyway, and probably with a nasty error like \"I/O timeout\".","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"06542fc2d5bcf20961391d1c1bb3f1a7a7aab720","unresolved":true,"context_lines":[{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"},{"line_number":90,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":1,"id":"ef34cdbd_b5bd87f0","line":87,"in_reply_to":"96c45aa6_8f77dc7c","updated":"2023-08-15 13:54:37.000000000","message":"Ugh, I always forget max is the maximum time to permit the call. 😞\n\nI *really* don\u0027t like it\u0027s logging either, but I\u0027m just not in the mood to make a logging class for it. Somehow we\u0027re logging \"None\", when the tenacity code should be logging the function name.... It actually should never be able to log None so I\u0027m betting, just now that I\u0027m thinking about it more, that we\u0027ve got an older version in constraints.","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5774fd7f9fcd961b3ce544098ced9b4425ebad55","unresolved":true,"context_lines":[{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"},{"line_number":90,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":1,"id":"f4ba15fc_86c7de4d","line":87,"in_reply_to":"ef34cdbd_b5bd87f0","updated":"2023-08-15 19:10:01.000000000","message":"I have a theory that on reads, we do end up silently locking, but I think that is the only reason to explain why API GETs generally don\u0027t get database is locked.","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                wait\u003dtenacity.wait_full_jitter("},{"line_number":85,"context_line":"                    min\u003d0.25,"},{"line_number":86,"context_line":"                    multiplier\u003d0.5,"},{"line_number":87,"context_line":"                    max\u003dCONF.database.sqlite_max_wait_for_retry),"},{"line_number":88,"context_line":"                before_sleep\u003d("},{"line_number":89,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"},{"line_number":90,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":1,"id":"e544db5f_c4208dab","line":87,"in_reply_to":"f4ba15fc_86c7de4d","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"a6150ad4669ab3912157a9e8f14b05e179861460"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a147b73d6c238dd6819ef7f8001256159fadf9c1","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    @functools.wraps(f)"},{"line_number":72,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":73,"context_line":"        if (CONF.database.sqlite_retries"},{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("}],"source_content_type":"text/x-python","patch_set":4,"id":"554f20b2_01ec4a45","line":74,"updated":"2023-08-16 08:25:06.000000000","message":"Hmm, by the way, s/and/or/ maybe?","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"7351f66ea5099a99f397cc3f3ac6d46feb26f9d7","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    @functools.wraps(f)"},{"line_number":72,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":73,"context_line":"        if (CONF.database.sqlite_retries"},{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("}],"source_content_type":"text/x-python","patch_set":4,"id":"c42ee695_ce9a2941","line":74,"in_reply_to":"554f20b2_01ec4a45","updated":"2023-08-16 13:39:39.000000000","message":"Not sure what your trying to convey here?","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    @functools.wraps(f)"},{"line_number":72,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":73,"context_line":"        if (CONF.database.sqlite_retries"},{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("}],"source_content_type":"text/x-python","patch_set":4,"id":"5d4b3f87_1b521458","line":74,"in_reply_to":"c42ee695_ce9a2941","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a147b73d6c238dd6819ef7f8001256159fadf9c1","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("},{"line_number":78,"context_line":"                retry\u003d("},{"line_number":79,"context_line":"                    tenacity.retry_if_exception_type("},{"line_number":80,"context_line":"                        sa.exc.OperationalError)"},{"line_number":81,"context_line":"                    \u0026 tenacity.retry_if_exception("},{"line_number":82,"context_line":"                        lambda e: \u0027database is locked\u0027 in str(e))"},{"line_number":83,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"b4741b12_bb39b36d","line":80,"updated":"2023-08-16 08:25:06.000000000","message":"I wonder if we should convert this exception into something more obviously retriable for the caller. E.g. we already use HTTP 503 when we\u0027re out of conductors, maybe we convert this error to HTTP 503 as well?","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"7351f66ea5099a99f397cc3f3ac6d46feb26f9d7","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("},{"line_number":78,"context_line":"                retry\u003d("},{"line_number":79,"context_line":"                    tenacity.retry_if_exception_type("},{"line_number":80,"context_line":"                        sa.exc.OperationalError)"},{"line_number":81,"context_line":"                    \u0026 tenacity.retry_if_exception("},{"line_number":82,"context_line":"                        lambda e: \u0027database is locked\u0027 in str(e))"},{"line_number":83,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"b7338996_5b99f525","line":80,"in_reply_to":"b4741b12_bb39b36d","updated":"2023-08-16 13:39:39.000000000","message":"This is the catch, and if we do that, we\u0027re going to need to have two decorators, one which never gives up,and one that can cause a a 503 to be returned.\n\nI\u0027m not sure our version of tenacity allows us do do anything aside from reraise, but we can look into it.","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"5816a8bcbb321aaa2d8fdeb55c65a3227208fbb4","unresolved":true,"context_lines":[{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("},{"line_number":78,"context_line":"                retry\u003d("},{"line_number":79,"context_line":"                    tenacity.retry_if_exception_type("},{"line_number":80,"context_line":"                        sa.exc.OperationalError)"},{"line_number":81,"context_line":"                    \u0026 tenacity.retry_if_exception("},{"line_number":82,"context_line":"                        lambda e: \u0027database is locked\u0027 in str(e))"},{"line_number":83,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"d6023c67_a0e1434d","line":80,"in_reply_to":"b7338996_5b99f525","updated":"2023-08-16 13:44:42.000000000","message":"I see how we can do it after looking at tenacity\u0027s source.","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            for attempt in tenacity.Retrying("},{"line_number":78,"context_line":"                retry\u003d("},{"line_number":79,"context_line":"                    tenacity.retry_if_exception_type("},{"line_number":80,"context_line":"                        sa.exc.OperationalError)"},{"line_number":81,"context_line":"                    \u0026 tenacity.retry_if_exception("},{"line_number":82,"context_line":"                        lambda e: \u0027database is locked\u0027 in str(e))"},{"line_number":83,"context_line":"                ),"}],"source_content_type":"text/x-python","patch_set":4,"id":"27b47c3a_a5516eb7","line":80,"in_reply_to":"d6023c67_a0e1434d","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a147b73d6c238dd6819ef7f8001256159fadf9c1","unresolved":true,"context_lines":[{"line_number":86,"context_line":"                    # Retry aggressively by keeping the wait window"},{"line_number":87,"context_line":"                    # short, and retry upwards of ten times before"},{"line_number":88,"context_line":"                    # failing."},{"line_number":89,"context_line":"                    max\u003d3,"},{"line_number":90,"context_line":"                ),"},{"line_number":91,"context_line":"                before_sleep\u003d("},{"line_number":92,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":4,"id":"aa1cbdc4_a18c834b","line":89,"updated":"2023-08-16 08:25:06.000000000","message":"I\u0027d use a range of something like (0.1, 1.0) and do it for 10 seconds max. 100ms is still eternity in the computing terms. If we don\u0027t get unlocked, it means we\u0027re quite hopelessly locked.","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                    # Retry aggressively by keeping the wait window"},{"line_number":87,"context_line":"                    # short, and retry upwards of ten times before"},{"line_number":88,"context_line":"                    # failing."},{"line_number":89,"context_line":"                    max\u003d3,"},{"line_number":90,"context_line":"                ),"},{"line_number":91,"context_line":"                before_sleep\u003d("},{"line_number":92,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":4,"id":"06131e2a_3e3504c6","line":89,"in_reply_to":"8a15868a_64ef2e17","updated":"2023-08-17 15:10:41.000000000","message":"Done","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"7351f66ea5099a99f397cc3f3ac6d46feb26f9d7","unresolved":true,"context_lines":[{"line_number":86,"context_line":"                    # Retry aggressively by keeping the wait window"},{"line_number":87,"context_line":"                    # short, and retry upwards of ten times before"},{"line_number":88,"context_line":"                    # failing."},{"line_number":89,"context_line":"                    max\u003d3,"},{"line_number":90,"context_line":"                ),"},{"line_number":91,"context_line":"                before_sleep\u003d("},{"line_number":92,"context_line":"                    tenacity.before_sleep_log(LOG, logging.DEBUG)"}],"source_content_type":"text/x-python","patch_set":4,"id":"8a15868a_64ef2e17","line":89,"in_reply_to":"aa1cbdc4_a18c834b","updated":"2023-08-16 13:39:39.000000000","message":"Makes sense to me.","commit_id":"9ee1900ab53a7deb9994388e9732cecd0a9ce5df"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"51e37e4f8c8ee2fe6b7e9310e3fe763b19d8a7b1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    @functools.wraps(f)"},{"line_number":72,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":73,"context_line":"        if (CONF.database.sqlite_retries"},{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"8bc9d1e5_d56a52d9","line":74,"updated":"2023-08-17 07:54:46.000000000","message":"This logic is still wrong, you get retries when someone with MariaDB sets sqlite_retries to False. The correct should be\n\n if (not CONF.database.sqlite_retries\n         or not utils.is_ironic_using_sqlite()):\n\nBy the way, this logic could be moved up the level to wrap_sqlite_retry.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9451d2feda137d6097397a5d1928e11db41bc972","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    @functools.wraps(f)"},{"line_number":72,"context_line":"    def wrapper(*args, **kwargs):"},{"line_number":73,"context_line":"        if (CONF.database.sqlite_retries"},{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"}],"source_content_type":"text/x-python","patch_set":5,"id":"b535ffd5_fb797e54","line":74,"in_reply_to":"8bc9d1e5_d56a52d9","updated":"2023-08-17 13:44:09.000000000","message":"oh, I see what your saying. Doh!","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"85a941c16b4392f42a4fde9ac9c7cd1cbb8a3051","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("}],"source_content_type":"text/x-python","patch_set":5,"id":"d2b6ed59_a4788054","line":77,"updated":"2023-08-16 17:06:17.000000000","message":"I don\u0027t know how/if this can be done better, but I worry that it\u0027ll be difficult for people reading the code to understand the behavior when we\u0027re changing it based on method name in the decorator. I\u0027d probably prefer a direct, kwarg based approach of \"stop_never\u003dbool\" or similar.\n\nOn the flip side; this is only behavior-changed for sqlite so hiding it may save some people from making bad assumptions, too.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"51e37e4f8c8ee2fe6b7e9310e3fe763b19d8a7b1","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("}],"source_content_type":"text/x-python","patch_set":5,"id":"69b4d624_e9c54db9","line":77,"updated":"2023-08-17 07:54:46.000000000","message":"It\u0027s fine to have stop_never because the decorator is already called wrap_sqlite_retry","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"26012edef39e5f719638718f61131b2e0f2af5d9","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("}],"source_content_type":"text/x-python","patch_set":5,"id":"6036f652_3e4d53a7","line":77,"in_reply_to":"008ea9b6_545454ff","updated":"2023-08-17 15:10:41.000000000","message":"sweet, gerrit lost my comment or I somehow lost it. Doh.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9451d2feda137d6097397a5d1928e11db41bc972","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                and not utils.is_ironic_using_sqlite()):"},{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("}],"source_content_type":"text/x-python","patch_set":5,"id":"008ea9b6_545454ff","line":77,"in_reply_to":"d2b6ed59_a4788054","updated":"2023-08-17 13:44:09.000000000","message":"I","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"51e37e4f8c8ee2fe6b7e9310e3fe763b19d8a7b1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("},{"line_number":81,"context_line":"                    max_delay\u003dCONF.database.sqlite_max_wait_for_retry"}],"source_content_type":"text/x-python","patch_set":5,"id":"2d9a2587_d395a081","line":78,"updated":"2023-08-17 07:54:46.000000000","message":"I can accept release_node here, it\u0027s definitely a bad idea to give up on it. Why update_node though? It\u0027s quite okay for it to fail.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9451d2feda137d6097397a5d1928e11db41bc972","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            return f(*args, **kwargs)"},{"line_number":76,"context_line":"        else:"},{"line_number":77,"context_line":"            if f.__name__ in [\u0027update_node\u0027, \u0027release_node\u0027]:"},{"line_number":78,"context_line":"                stop \u003d tenacity.stop_never"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                stop \u003d tenacity.stop_after_delay("},{"line_number":81,"context_line":"                    max_delay\u003dCONF.database.sqlite_max_wait_for_retry"}],"source_content_type":"text/x-python","patch_set":5,"id":"36881332_3bda2118","line":78,"in_reply_to":"2d9a2587_d395a081","updated":"2023-08-17 13:44:09.000000000","message":"If we can\u0027t close out on state changes, then the overall operation completely falls over. So it seems reasonable to me, to be aggressive and ensure we don\u0027t fall over at the very end of our internal work, we must also be aggressive on update node since the node is the primary database object.","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"51e37e4f8c8ee2fe6b7e9310e3fe763b19d8a7b1","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                ),"},{"line_number":97,"context_line":"                stop\u003dstop,"},{"line_number":98,"context_line":"                reraise\u003dFalse,"},{"line_number":99,"context_line":"                retry_error_cls\u003dexception.TemporaryFailure):"},{"line_number":100,"context_line":"                with attempt:"},{"line_number":101,"context_line":"                    return f(*args, **kwargs)"},{"line_number":102,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":5,"id":"b4dd5936_078b2b0a","line":99,"updated":"2023-08-17 07:54:46.000000000","message":"nit: maybe a subclass with a more specific message?","commit_id":"1d87e1fa2a539881dc57da5e30015bb9a949fc26"}]}
