{"record":{"id":"b629798b1fd937ac","repo":"eclipse-vertx/vert.x","slug":"oops","errorCode":null,"errorMessage":"Oops!","messagePattern":"Oops!","errorType":"exception","errorClass":"VertxException","httpStatus":null,"severity":"critical","filePath":"vertx-core/src/main/java/io/vertx/core/impl/HAManager.java","lineNumber":513,"sourceCode":"    CountDownLatch latch = new CountDownLatch(1);\n    // The testsuite requires that this is called on a Vert.x thread\n    vertx.runOnContext(v -> {\n      try {\n        runnable.run();\n      } finally {\n        latch.countDown();\n      }\n    });\n    try {\n      latch.await(30, TimeUnit.SECONDS);\n    } catch (InterruptedException ignore) {\n    }\n  }\n\n  // Process the failover of a deployment\n  private void processFailover(JsonObject failedVerticle) {\n    if (failDuringFailover) {\n      throw new VertxException(\"Oops!\");\n    }\n    // This method must block until the failover is complete - i.e. the verticle is successfully redeployed\n    final String verticleName = failedVerticle.getString(\"verticle_name\");\n    final CountDownLatch latch = new CountDownLatch(1);\n    final AtomicReference<Throwable> err = new AtomicReference<>();\n    // Now deploy this verticle on this node\n    ((VertxImpl)vertx).executeIsolated(v -> {\n      JsonObject options = failedVerticle.getJsonObject(\"options\");\n      doDeployVerticle(verticleName, new DeploymentOptions(options)).onComplete(result -> {\n        if (result.succeeded()) {\n          log.info(\"Successfully redeployed verticle \" + verticleName + \" after failover\");\n        } else {\n          log.error(\"Failed to redeploy verticle after failover\", result.cause());\n          err.set(result.cause());\n        }\n        latch.countDown();\n        Throwable t = err.get();\n        if (t != null) {","sourceCodeStart":495,"sourceCodeEnd":531,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/impl/HAManager.java#L495-L531","documentation":"During HA failover, HAManager.processFailover redeploys a failed node's verticles on this node. If the failDuringFailover fault-injection flag is set (typically via -Dvertx.ha.failover-on-failover or test hooks), it deliberately throws VertxException('Oops!').","triggerScenarios":"Setting the vertx.ha.fail-on-failover style system property and then triggering failover (killing the HA node and running another node's checkFailover).","commonSituations":"Almost exclusively in HA fault-injection tests; production hits only if the fault-injection system property was accidentally left enabled in the environment.","solutions":["Remove the failover fault-injection system property (e.g. -Dvertx.ha.failDuringFailover=true) from the JVM arguments","Check launch scripts/container env for leftover HA test flags","If seen in tests, this is the expected simulated failure — assert on it rather than fixing"],"exampleFix":"// before\njava -Dvertx.ha.failDuringFailover=true -cp ... io.vertx.launcher.application.VertxApplication run my_verticle.js -ha\n// after\njava -cp ... io.vertx.launcher.application.VertxApplication run my_verticle.js -ha","handlingStrategy":"validation","validationCode":"if (System.getProperty(\"vertx.ha.failDuringFailover\") != null) { /* remove before prod */ }","typeGuard":null,"tryCatchPattern":"try { vertx.start(); } catch (VertxException e) { if (\"Oops!\".equals(e.getMessage())) log.error(\"HA fault-injection flag enabled in production!\"); throw e; }","preventionTips":["Never set HA fault-injection system properties outside test harnesses","Scan prod launch scripts for -Dvertx.ha.* test flags","Treat 'Oops!' from HAManager as a config red flag"],"tags":["ha","failover","fault-injection","vertx-exception"],"backgroundTag":"invalid-config-value","analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}