jdaugherty commented on PR #16631:
URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6428473079

   @jamesfredley I've pushed another round of hardening on top of the last one. 
It's still a single commit on 9.0.x. Here's what changed:
   
   **Capture never fails the statement**
   - Recording is now guarded end to end. If the request can't be read or the 
values can't be redacted, that statement is left out: the capture warns once 
and logs at debug after that. The query itself runs as it would without the 
capture.
   - MongoDB redaction now runs inside that guard, and it's skipped once the 
capture has stopped.
   - If the file system can't lock the lock file, the capture falls back to 
writing uncoordinated instead of failing startup. Some network and shared 
folders behave this way, and so does a FIFO on macOS.
   - A statement that runs after its request has completed is attributed to its 
thread.
   
   **Request attribution**
   - The request line is worked out once per request and cached on the request. 
It's only recomputed when the request moves on, as a forward moves it. Before 
this, it was rebuilt for every statement.
   - The path is now read against the URL mapping Grails matched, so 
`"/book/show/$id"` records `/book/show/?` exactly. The value-matching 
heuristics are only a fallback for when the path doesn't follow the mapping. A 
segment that names the controller, action or namespace is always kept.
   - Requests served by Spring MVC handlers are recorded as the pattern their 
handler mapping matched.
   - Request ids are assigned under the request's mutex. Async task threads 
carry their own request attributes, so they now number a request once and count 
toward it.
   
   **Settings and stores**
   - `QueryTailSettings` now lives on `ConnectionSourceSettings` in 
`grails-datastore-core`. It's bound from `grails.gorm.queryTail` like any other 
setting, with the usual fallback, which replaces the per-store wiring in H5, 
H7, MongoDB and Neo4j.
   - MongoDB clients that Spring Boot settings build are now captured. GORM 
adds its listener through a new client-factory constructor. Clients the 
application builds itself can't be captured, and GORM now warns when capture is 
enabled for one.
   
   **Test runs**
   - The Grails Gradle plugin names one run per build and passes it to test 
JVMs as `grails.gorm.queryTail.run`. Datastores that specs open and close one 
after another, and a project's `test` and `integrationTest` tasks, now append 
to one run instead of truncating each other. The next build starts its own.
   
   **Command**
   - `--page=book/show` also matches namespaced pages such as `admin:book/show`.
   - An invalid `--top` value is reported with a clear message instead of a 
`NumberFormatException`.
   - `EXPLAIN`/`PROFILE` of a Cypher statement is classified by the statement 
it plans. The plan of a SQL statement is no longer mistaken for Cypher.
   
   I also changed the new API from `@since 8.1` to `@since 9.0`, and updated 
the guide and the command reference to match all of the above.
   


-- 
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