aiai-bot commented on PR #3953:
URL: https://github.com/apache/hertzbeat/pull/3953#issuecomment-3743494230

   <!-- code-pr-reviewer -->
   ## Blocking Issues
   
   ### 1. Index Name Collision in MonitorBind
   **File:** 
`hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/manager/MonitorBind.java:45`
   - Duplicate index name `index_monitor_bind` for both `biz_id` and 
`monitor_id` columns will cause DDL failures
   - Fix typo: `index_monitor_bin` → `index_monitor_bind_monitor_id`
   
   ### 2. AlertDefineMonitorBind Column Name Mismatch
   **File:** 
`hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/alerter/AlertDefineMonitorBind.java:51`
   - Entity annotation uses `alert_define_id` but field name is `alertDefineId` 
- migration scripts will fail
   - Verify actual column name in existing schema
   
   ### 4. Migration Script Idempotency Risk
   **Files:** `V181__update_indexes.sql` (all databases)
   - H2's `CREATE ALIAS` may fail on partial re-execution; MySQL stored 
procedures with `DELIMITER` may not work in all Flyway contexts
   - Test migration rollback scenarios explicitly
   
   ### 6. Test Configuration Issue
   **File:** 
`hertzbeat-startup/src/test/java/org/apache/hertzbeat/startup/EntityIndexIntegrationTest.java:40`
   - Missing cleanup between iterations may cause state pollution; consider 
`@DataJpaTest` for isolated testing
   
   **Suggested tests:** `EntityIndexIntegrationTest` across 
H2/MySQL/PostgreSQL; full Flyway migration V180→V181 on existing schema


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to