codeconsole commented on PR #16208:
URL: https://github.com/apache/grails-core/pull/16208#issuecomment-5769133353

   One change in behaviour since the last round, in 7d927e10be, so that it 
doesn't arrive unannounced.
   
   `grails.mongodb.buildIndexes = false` made `MongoDatastore.buildIndex()` a 
no-op. So an application that deploys without touching its indexes had no way 
to build them afterwards — once the deployment is verified, from an admin 
action, or on a schedule — short of flipping the setting and restarting. That 
seemed the wrong reading of "off", and it is cheaper to settle before this 
ships than after.
   
   The setting now governs only the builds GORM starts by itself: at startup, 
for each named connection, for a connection added at runtime, and for a domain 
class registered later. An explicit `buildIndex()` always builds. It still 
refuses after `close()` and defers while stopped. It honours 
`buildIndexesAsync`, so the executor exists whenever builds are asynchronous, 
not only when GORM builds by itself; it holds no thread until something is 
submitted. A named connection builds through its own datastore.
   
   - **Tests:** `BuildIndexesOnDemandSpec` covers an explicit build with the 
setting off, synchronously, on the background thread, and for a named 
connection, and checks that a `stop()`/`start()` still builds nothing by 
itself. The `BuildIndexesDisabledSpec` feature that pinned the old no-op is 
gone.
   - **Docs:** the guide has a new "Building Indexes on Demand" section with 
the example. The configuration reference, release notes, setting Javadoc and 
configuration metadata now describe the setting as what GORM does by itself.
   - **Run locally** on JDK 21 with `-PmaxTestParallel=4`: 
`:grails-data-mongodb-core:check` gives 807 tests, 0 failures, 45 skipped, with 
style clean and no mongod exit. The docs build, `aggregateViolations` and `rat` 
are clean.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to