bigcyy opened a new issue, #3454:
URL: https://github.com/apache/hertzbeat/issues/3454
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Current Behavior
The GroupAlert entity table cannot be created normally in the MySQL
database, leading to the unavailability of related functionalities. When the
application starts, other entities (like AlertGroupConverge, SingleAlert, etc.)
can successfully create their tables, but the GroupAlert table creation fails.
### Expected Behavior
_No response_
### Steps To Reproduce
By enabling detailed JPA logging configuration:
```yaml
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
url:
jdbc:mysql://localhost:3308/hertzbeat?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false
hikari:
max-lifetime: 120000
jpa:
show-sql: true
database-platform:
org.eclipse.persistence.platform.database.MySQLPlatform
database: mysql
properties:
eclipselink:
logging:
level: ALL
parameters: true
ddl-generation: create-or-extend-tables
ddl-generation.output-mode: both
```
After enabling detailed logging, the true error message was discovered:
```
[EL Warning]: Exception [EclipseLink-4002]
Internal Exception: java.sql.SQLSyntaxErrorException: Row size too large.
The maximum row size for the used table type, not counting BLOBs, is 65535.
This includes storage overhead, check the manual.
You have to change some columns to TEXT or BLOBs
Error Code: 1118
```
**Problem Root Cause**: The total length of `VARCHAR` fields in the
`GroupAlert` entity exceeds MySQL's 65535-byte row size limit:
### Environment
```markdown
HertzBeat version(s): v1.7.1
Database: MySQL 8.0
```
### Debug logs
_No response_
### Anything else?
_No response_
--
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]