jdaugherty commented on PR #16631: URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6417931886
@jamesfredley, I pushed 6b3f7c9935 over 28b2772301, still a single commit on 9.0.x. It fixes four more problems: - **Inspector names (H5 and H7):** Hibernate can select a statement inspector by a name registered with its `StrategySelector`. With capture on, such a name failed the start, because the capture loaded every string as a class name. The capture now resolves `hibernate.session_factory.statement_inspector` through the session factory's strategy selector, as Hibernate does. A value Hibernate rejects, such as an empty or space-padded name, now fails the same way with capture on as without it. - **Observer set during the build (H5 and H7):** the capture took the configuration's observer slot when the connection source was created. A `hibernate.configClass` that set its own observer in `buildSessionFactory()` replaced it, and the capture never closed. The capture now chains the application's observer when the session factory is built. On H5 that happens before the registry-closing observer wraps it, and building the same configuration again no longer chains the capture to itself. - **Symbolic links across JVMs:** the lock file was named after the path each JVM opened. Two JVMs naming the capture through a link and through its target took different locks, and the second truncated the first's run. The lock is now keyed by the canonical path. Links are followed by hand first, so a link to a file that doesn't exist yet resolves too. - **CLI memory:** the summary kept a statement-count map for every request in every mode. `--statements` now keeps only each request's key. Page mode folds each request's totals into its page as statements arrive, and keeps per-request counts only for the last 1000 active requests of each page. The command reference describes this. Tests: - **H5/H7 `QueryTailStatementInspectorSpec`:** a named inspector with and without capture, names Hibernate rejects, a configured class that isn't an inspector, and an observer set in the constructor or during the build. The observer cases check that the capture closes and that reopening the file starts a new run. - **H5/H7 `HibernateConnectionSourceFactorySpec`:** builds one configuration twice with capture off and on. Without the self-chaining guard, the capture-on case overflows the stack. - **H5 `HibernateMappingContextConfigurationSpec`:** checks the service registry is still destroyed for both observer timings, with capture off and on. - **`QueryTailCaptureSpec`:** two JVMs write through the file and through a link, in both directions. A third feature opens a link before its file exists, in one JVM. - **First failed write:** this feature now runs in a child JVM with a zero file-size limit instead of a link to `/dev/full`. It runs on macOS and on CI without root. - **`QueryTailRunnerSpec`:** summarizes 350,000 records, each its own request, in a child JVM limited to 96 MB, in both modes, plus a one-request control. The previous summary needed 192 MB for that capture. Locally, the full `:grails-data-hibernate5-core` and `:grails-data-hibernate7-core` suites pass, and so does `:grails-datamapping-core:check`. The MongoDB and Neo4j query-tail specs pass too. `QueryTailCaptureSpec` also passes in a Linux container, as root and as a non-root user. -- 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]
