Aias00 opened a new pull request, #2672:
URL: https://github.com/apache/rocketmq-dashboard/pull/2672

   ## Summary
   
   Add user-scoped composite indexes for message and trace query history so the 
history list and summary access paths can filter by requester/instance/query 
type and sort by recent rows without scanning unrelated users' history.
   
   Closes #2665
   
   ## Changes
   
   - Add fresh-schema indexes:
     - `rmq_instance_message(queried_by, cluster_id, query_type, gmt_create, 
id)`
     - `rmq_instance_trace(queried_by, cluster_id, gmt_create, id)`
   - Add `QueryHistorySchemaMigration` to backfill the same indexes for 
existing Studio databases through the current idempotent startup migration 
pattern.
   - Add schema contract tests for both fresh schema creation and 
existing-table migration.
   
   ## Compatibility with #1374
   
   This branch does not depend on #1374 because Flyway is not present on the 
current `rocketmq-studio` baseline. The change follows the existing 
`schema.sql` plus startup `ApplicationRunner` upgrade style. If a versioned 
Flyway migration path lands later, these two index definitions can be moved 
into a formal migration without changing the index contract.
   
   ## Verification
   
   - RED: `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn 
-Dtest=QueryHistorySchemaIndexTest test` failed before implementation because 
the expected indexes were missing.
   - GREEN targeted: `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn 
-Dtest=QueryHistorySchemaIndexTest,QueryHistoryServiceTest,QueryHistoryServiceIntegrationTest,QueryHistoryControllerTest,DemoDataSqlCompatibilityTest
 test` passed, 15 tests.
   - Full backend: `JAVA_HOME=$(/usr/libexec/java_home -v 21) mvn test` passed, 
1790 tests.
   - `git diff --check` passed.
   
   ## MySQL EXPLAIN note
   
   A real MySQL 8 EXPLAIN run was attempted but the local environment has no 
running MySQL service and Docker daemon is unavailable:
   
   - `mysql` TCP/socket connection failed.
   - `brew services list` reports `mysql stopped`.
   - `docker ps` cannot connect to the Docker daemon.
   


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