unbridled-41 opened a new pull request, #5995:
URL: https://github.com/apache/rocketmq-dashboard/pull/5995

   ### Which Issue(s) This PR Fixes
   Fixes #5994
   ### Problem / Evidence
   The three `ALTER TABLE ... MODIFY` statements in `db/schema.sql` only run on 
a fresh data directory or in dev; no `ApplicationRunner` widened the columns, 
so a pre-widening volume keeps 64 characters:
   ```
   QueryHistorySchemaIndexTest: 
migrationWidensTheOwnerColumnsOfAnExistingDatabaseTest
   expected: 128 but was: 64
   ```
   ### Root cause / Fix
   A legacy-shape upgrade written into the fresh-install DDL instead of a 
runner, unlike 
AlertSchemaMigration/QueryHistorySchemaMigration/AiConversationSchemaMigration. 
Add an idempotent width step to the existing query-history migration 
(product-appropriate statement for MySQL/H2, warning instead of a boot failure 
when refused).
   ### Priority and scoring
   **PRIORITY 62** - impact 26/40 (a long username's query history and audit 
rows are silently lost or stored under a truncated owner), blast radius 12/20 
(databases created before the widening), reproducibility 18/20 (pinned by the 
new H2 test), maintenance value 6/20. **FIX_CONFIDENCE 80**.
   ### Tests
   `cd server && mvn -o -B -ntp test 
-Dtest='QueryHistorySchemaIndexTest,QueryHistorySchemaMigrationTest'` -> `Tests 
run: 5, Failures: 0, Errors: 0`; the new case creates the pre-widening shape, 
runs the migration twice and asserts 128 plus a successful 100-character 
insert; `-Dtest='org.apache.rocketmq.studio.instance.message.**'` -> `Tests 
run: 65`; `checkstyle:check` passes.
   ### Risk
   A narrow column is widened on startup (a metadata read plus one DDL per 
column, once); a refused widening is logged and leaves the previous behaviour.
   


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