{"record":{"id":"ba26ac1a085f3f78","repo":"apache/beam","slug":"retrying-in-ms","errorCode":null,"errorMessage":"Retrying in {} ms.","messagePattern":"Retrying in (.+?) ms\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/IOITHelper.java","lineNumber":94,"sourceCode":"   * @param function The function to retry\n   * @throws Exception\n   */\n  public static void executeWithRetry(int maxAttempts, long minDelay, RetryFunction function)\n      throws Exception {\n    int attempts = 1;\n    long delay = minDelay;\n\n    while (attempts <= maxAttempts) {\n      try {\n        function.run();\n        return;\n      } catch (Exception e) {\n        LOG.warn(\"Attempt #{} of {} failed\", attempts, maxAttempts, e);\n        if (attempts == maxAttempts) {\n          throw e;\n        } else {\n          long nextDelay = (long) Math.pow(2, attempts) * delay;\n          LOG.warn(\"Retrying in {} ms.\", nextDelay);\n          Thread.sleep(nextDelay);\n        }\n        attempts++;\n      }\n    }\n  }\n}\n","sourceCodeStart":76,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/IOITHelper.java#L76-L102","documentation":"WARN logged by IOITHelper.executeWithRetry right after a failed attempt, announcing the exponential backoff delay (2^attempts * minDelay milliseconds) before the next try. Purely informational: it makes the escalating wait visible in test logs so a slow-to-start dependency doesn't look like a hang.","triggerScenarios":"Thrown at sdks/java/io/common/src/main/java/org/apache/beam/sdk/io/common/IOITHelper.java:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Tune maxAttempts/minDelay so total retry time exceeds the dependency's worst-case startup time","Check the 'Attempt #n failed' log for why retries are needed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}