apupier opened a new pull request, #31269: URL: https://github.com/apache/camel/pull/31269
# Description CAMEL-25882 follow-up of #29704 and #31248: set `datastax-java-driver.advanced.metadata.schema.debouncer.window = 0` in the test-only `application.conf` of `camel-cassandraql`. Profiling `CassandraKeyValueRepositoryIT` showed that the tests creating a table (`testKeys`, `testClear`, `testSize`, `testKeysAndSizeIgnoreExpiredEntries`) spend about 1.05 s in `CREATE TABLE`, and nothing else in the setup or teardown is slow. On the server a single node `CREATE TABLE` takes about 70 ms (measured with `cqlsh`, 20 statements in one session), so the remaining second is on the client side. The driver debounces its schema metadata refresh by 1 second by default; setting the window to 0 removes the wait. Note: I inferred the mechanism from these measurements; I did not confirm it in the driver sources. ## Benchmark `mvn verify -Pit -pl components/camel-cassandraql`, 94 tests passing before and after. | | before | after | |---|---|---| | `testKeys`, `testClear`, `testSize` | about 1.2 s each | 0.25-0.34 s | | `testKeysAndSizeIgnoreExpiredEntries` | 2.8 s | 1.6 s | | `CassandraKeyValueRepositoryIT` | 22.0 s | 18.7 s | | module ITs, wall time of the build | 63 s | 54 s | ## Risk Test-only change. Only `CassandraKeyValueRepositoryIT` runs DDL through the driver (4 `CREATE TABLE`); the other tables come from the container init script. With the window at 0 every schema event triggers its own refresh, which only costs a few more metadata queries; the driver's view of the schema lags the server less, not more. `CassandraKeyValueRepositoryIT` was run 10 times in a row without failure. The whole module was not run under `-Dcamel.surefire.forkCount=8`. No upgrade guide entry: test-only change. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-25882) filed for the change # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. (only the `camel-cassandraql` ITs were run; a resource file in `src/test` is the only change, no generated files are affected) --- _IBM Bob on behalf of Aurélien Pupier_ -- 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]
