mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
The MongoDB health indicators ran the `hello` command against every database returned by `listDatabaseNames()`. For the reactive indicator these commands were issued in parallel via `flatMap`, so a deployment with many databases per connection could open a connection per database on each health check, dramatically increasing connection usage (a regression from the Spring Data based implementation used previously). Since `hello` is a server-level command whose result is independent of the target database, run it only once, against the `admin` database if available or the first returned database otherwise. The `databases` and `maxWireVersion` details are preserved. See gh-50734 Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com>