{"record":{"id":"a8ca068a0e42700a","repo":"apache/druid","slug":"timed-out-waiting-for-operation-s-to-complete","errorCode":null,"errorMessage":"Timed out waiting for operation %s to complete","messagePattern":"Timed out waiting for operation (.+?) to complete","errorType":"exception","errorClass":"InterruptedException","httpStatus":null,"severity":"error","filePath":"extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java","lineNumber":197,"sourceCode":"    String status = operation.getStatus();\n    String opId = operation.getName();\n    for (int i = 0; i < OPERATION_END_MAX_RETRIES; i++) {\n      if (operation == null || \"DONE\".equals(status)) {\n        return operation == null ? null : operation.getError();\n      }\n      log.info(\"Waiting for operation %s to end\", opId);\n      Thread.sleep(POLL_INTERVAL_MS);\n      Compute.ZoneOperations.Get get = compute.zoneOperations().get(\n          envConfig.getProjectId(),\n          envConfig.getZoneName(),\n          opId\n      );\n      operation = get.execute();\n      if (operation != null) {\n        status = operation.getStatus();\n      }\n    }\n    throw new InterruptedException(\n        StringUtils.format(\"Timed out waiting for operation %s to complete\", opId)\n    );\n  }\n\n  /**\n   * When called resizes envConfig.getManagedInstanceGroupName() increasing it by creating\n   * envConfig.getNumInstances() new workers (unless the maximum is reached). Return the\n   * IDs of the workers created\n   */\n  @Override\n  public AutoScalingData provision()\n  {\n    final String project = envConfig.getProjectId();\n    final String zone = envConfig.getZoneName();\n    final int numInstances = envConfig.getNumInstances();\n    final String managedInstanceGroupName = envConfig.getManagedInstanceGroupName();\n\n    try {","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java#L179-L215","documentation":"Raised after polling a GCE zone operation OPERATION_END_MAX_RETRIES times at POLL_INTERVAL_MS intervals without the operation reaching DONE status. The long-running GCE operation (e.g. instance start/terminate during autoscaling) is taking longer than the fixed retry budget allows, so the autoscaler gives up waiting and reports a timeout.","triggerScenarios":"Thrown at extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the GCE console / `gcloud compute operations describe` for the operation's real status and any errors.","Increase OPERATION_END_MAX_RETRIES or POLL_INTERVAL_MS in GceAutoScaler if operations legitimately take long in your project.","Retry the autoscaling action; the operation may still complete asynchronously.","Check for quota exhaustion, capacity issues, or slow API responses in the target zone."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}