The GitHub Actions job "CI" on 
grails-core.git/feat/mongo-external-client-lifecycle has succeeded.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
d95eb4418714bf912ce3003ce4ac98ce5854be47 / Scott Murphy Heiberg 
<[email protected]>
Do not close an externally-supplied MongoClient in GORM for MongoDB

GORM's connection-source shutdown closes any Closeable source, and a 
MongoClient is
Closeable, so a client handed to GORM (for example a Spring-managed bean, or 
one passed
to new MongoDatastore(mongoClient, ...)) was closed when the datastore shut 
down -
double-closing a client whose lifecycle is owned elsewhere.

DefaultConnectionSource now supports a non-closeable mode (a new constructor 
plus
isCloseable()); the existing constructor is unchanged. MongoDatastore wraps an
externally-supplied client as non-closeable so GORM no longer closes a client 
it did not
create, and MongoDbGormAutoConfiguration closes only the client it created 
itself. GORM
still closes clients it creates from grails.mongodb.* configuration.

The only behavior change affects callers that relied on MongoDatastore.close() 
to also
close a client they passed in; they must now close it themselves. This is 
documented in
the upgrade notes.

Report URL: https://github.com/apache/grails-core/actions/runs/27879595420

With regards,
GitHub Actions via GitBox

Reply via email to