{"record":{"id":"2cc91a64f9669256","repo":"redis/jedis","slug":"database-database-endpoint-successfully-updated-fr","errorCode":null,"errorMessage":"Database/database endpoint successfully updated from '{}' to '{}'","messagePattern":"Database/database endpoint successfully updated from '(.+?)' to '(.+?)'","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java","lineNumber":722,"sourceCode":"    // 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;\n\n  }","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java#L704-L740","documentation":"This is a warning logged by MultiDbConnectionProvider when the active database is switched from one database/endpoint to a different one: the old database's circuit breaker name and the new one are logged as the provider swaps activeDatabase under activeDatabaseChangeLock. No exception is thrown; it records that failover (or a requested switch) completed and traffic now routes to the new database.","triggerScenarios":"A switch operation (health-driven failover or explicit switch) validates the target connection and sets activeDatabase = database where activeDatabase != database; the log reports the transition from the previous database name to database.circuitBreaker.getName().","commonSituations":"Primary endpoint failing health checks so the provider fails over to a replica/alternate database; manual database switch requested by the application; temporary network partition causing repeated switch warnings.","solutions":["No action needed for an expected failover; confirm application traffic is being served by the intended new database.","If switches happen unexpectedly, check why the previous database's circuit breaker opened (endpoint health, REST API, network).","Adjust failover thresholds (health check intervals, breaker policy) if switches are too aggressive for your SLA."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Informational failover log; handle transient errors during the switch window\ntry {\n  runWorkload();\n} catch (redis.clients.jedis.exceptions.JedisConnectionException e) {\n  // brief unavailability while activeDatabase swaps; retry with backoff\n}","preventionTips":["Confirm the intended failover target ordering in the provider's database list.","Alert on this log if unexpected failovers occur; correlate with the previous database's breaker events.","Use validated connections (validateConnection=true) so switches only land on healthy targets.","Keep per-database credentials/pools pre-warmed to shorten switch windows."],"tags":["circuit-breaker","failover","multi-db","logging","switch"],"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"}