{"record":{"id":"e3220611ab8ead1e","repo":"prestodb/presto","slug":"retry-fetching-sidecar-function-registry-interrupt","errorCode":null,"errorMessage":"Retry fetching sidecar function registry interrupted","messagePattern":"Retry fetching sidecar function registry interrupted","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"presto-built-in-worker-function-tools/src/main/java/com/facebook/presto/builtin/tools/NativeSidecarFunctionRegistryTool.java","lineNumber":133,"sourceCode":"        for (int attempt = 1; attempt <= maxRetries; attempt++) {\n            try {\n                sidecarNode = nodeManager.getSidecarNode();\n                if (sidecarNode != null) {\n                    break;\n                }\n            }\n            catch (Exception e) {\n                log.error(\"Error getting sidecar node (attempt \" + attempt + \"): \" + e.getMessage());\n                if (attempt == maxRetries) {\n                    throw new RuntimeException(\"Failed to get sidecar node\", e);\n                }\n                else {\n                    try {\n                        Thread.sleep(retryDelayMs);\n                    }\n                    catch (InterruptedException ie) {\n                        Thread.currentThread().interrupt();\n                        throw new RuntimeException(\"Retry fetching sidecar function registry interrupted\", ie);\n                    }\n                }\n            }\n        }\n\n        return HttpUriBuilder\n                .uriBuilderFrom(sidecarNode.getHttpUri())\n                .appendPath(FUNCTION_SIGNATURES_ENDPOINT)\n                .build();\n    }\n}\n","sourceCodeStart":115,"sourceCodeEnd":145,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-built-in-worker-function-tools/src/main/java/com/facebook/presto/builtin/tools/NativeSidecarFunctionRegistryTool.java#L115-L145","documentation":"Thrown when the retry loop's sleep between sidecar-node lookup attempts is interrupted (Thread.sleep or the future wait throws InterruptedException). Startup discovery of the sidecar node was cancelled mid-retry.","triggerScenarios":"Thrown at presto-built-in-worker-function-tools/src/main/java/com/facebook/presto/builtin/tools/NativeSidecarFunctionRegistryTool.java:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restore the interrupted status and let startup abort cleanly if the worker is shutting down","Avoid interrupting the thread performing sidecar discovery","Re-run the worker start once the interrupt source is removed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}