{"record":{"id":"20fdf9666faabd88","repo":"redis/jedis","slug":"database-database-endpoint-successfully-close","errorCode":null,"errorMessage":"Database/database endpoint '{}' successfully closed its circuit breaker","messagePattern":"Database/database endpoint '(.+?)' successfully closed its circuit breaker","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java","lineNumber":720,"sourceCode":"\n  private boolean setActiveDatabase(Database database, boolean validateConnection) {\n    // Database database = databaseEntry.getValue();\n    // Field-level synchronization is used to avoid the edge case in which\n    // setActiveDatabase() is called at the same time\n    activeDatabaseChangeLock.lock();\n    Database oldDatabase;\n    try {\n\n      // Allows an attempt to reset the current database from a FORCED_OPEN to CLOSED state in the\n      // event that no failover is possible\n      if (activeDatabase == database && !database.isCBForcedOpen()) return false;\n\n      if (validateConnection) validateTargetConnection(database);\n\n      String originalDatabaseName = getDatabaseCircuitBreaker().getName();\n\n      if (activeDatabase == database)\n        log.warn(\"Database/database endpoint '{}' successfully closed its circuit breaker\",\n          originalDatabaseName);\n      else log.warn(\"Database/database endpoint successfully updated from '{}' to '{}'\",\n        originalDatabaseName, database.circuitBreaker.getName());\n      oldDatabase = activeDatabase;\n      activeDatabase = database;\n    } finally {\n      activeDatabaseChangeLock.unlock();\n    }\n    boolean switched = oldDatabase != database;\n    if (switched && this.multiDbConfig.isFastFailover()) {\n      log.info(\"Forcing disconnect of all active connections in old database: {}\",\n        oldDatabase.circuitBreaker.getName());\n      oldDatabase.forceDisconnect();\n      log.info(\"Disconnected all active connections in old database: {}\",\n        oldDatabase.circuitBreaker.getName());\n\n    }\n    return switched;","sourceCodeStart":702,"sourceCodeEnd":738,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java#L702-L738","documentation":"This is a warning logged by MultiDbConnectionProvider during a database failover/switch: the target database being activated is the same object as the currently active one, meaning its circuit breaker transitioned from open back to closed (recovered), so the provider re-selects it. No exception is thrown; it informs operators that the original endpoint has been re-promoted after recovery.","triggerScenarios":"The provider's switch/close path runs with validateTargetConnection succeeding and activeDatabase == database — i.e. the health-checked endpoint that just recovered is the one already selected, so the switch is effectively a circuit-breaker close on the original database.","commonSituations":"A failover moved traffic away from a primary and the primary later recovered, so failback re-closes its breaker; repeated open/close flapping of a circuit breaker on a flaky endpoint; graceful shutdown/failover tests re-selecting the same database.","solutions":["No action required if this is an expected failback — it confirms the original endpoint is healthy again.","If the log appears frequently, investigate endpoint stability (network jitter, latency spikes) that flaps the circuit breaker.","Tune the circuit breaker / health check policy (num probes, intervals) so borderline endpoints do not oscillate open/closed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Informational log, not thrown; optionally observe failback events\ntry {\n  runWorkload();\n} catch (redis.clients.jedis.exceptions.JedisException e) {\n  // transient breaker transitions may surface here; retry with backoff\n}","preventionTips":["Treat this log as confirmation of healthy failback; no remediation needed.","If it flaps, investigate endpoint stability rather than silencing the log.","Tune breaker thresholds/probe counts to match your endpoint's normal latency variability.","Keep MultiDbConnectionProvider database list current with actual cluster topology."],"tags":["circuit-breaker","failover","multi-db","logging","recovery"],"backgroundTag":"invalid-state-transition","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}