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

   @jamesfredley, review 5672694161 is addressed. The head is now fe3a01a69b, 
still a single commit on 9.0.x. It folds in b8a79742d1, which I pushed earlier 
today.
   
   - **Commands not aimed at a collection (MongoDB):** a collection is taken 
only from a command that runs against one, so `{"dropUser": 
"[email protected]"}` is recorded as `dropUser admin {"dropUser": ?}`. Details 
are on the thread.
   - **Map-reduce scope (MongoDB):** none of the keys in a `scope` are 
recorded, at any depth. Details are on the thread.
   
   The same push changes how Hibernate 5 and 7 statements are counted:
   - **Counted at execution:** SQL is now recorded when JDBC runs it, not when 
Hibernate prepares it. Each execution of a reused statement counts, and so does 
each entry an `executeBatch` submits, so 50 inserts count as 50 with or without 
JDBC batching. A prepared statement that never runs, or a batch cleared before 
it runs, counts nothing. Failed executions and statements later rolled back 
still count. The capture wraps the connections Hibernate's connection provider 
hands out and gives the provider back its own connection on release. It never 
reads bound values. The application's statement inspector still runs first, and 
the statement it returns is the one recorded.
   - **Tests:** `QueryTailStatementInspectorSpec`, for Hibernate 5 and 7, 
counts every inserted, updated and deleted row across JDBC batch sizes, 
including a session-level override. It counts executions and submitted batches 
in direct JDBC work, but not preparation or cleared and abandoned entries. It 
also checks that a configured connection provider keeps its injections, its 
lifecycle and the identity of its connections.
   
   The guide is updated to match.
   


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