Commit 312088a
gateway: use 191-char prefix index on aa_instance_heartbeats.instance_id
The unique index on `instance_id` (VARCHAR(255), utf8mb4) overflowed
MySQL InnoDB's 767-byte key length limit (255 * 4 = 1020 bytes),
causing `CREATE UNIQUE INDEX ... ON aa_instance_heartbeats(instance_id)`
to fail with "Specified key was too long" during gateway startup and
aborting the migration.
Switch the MySQL DDL to a 191-char prefix index, which keeps the index
key under 767 bytes (191 * 4 = 764) while remaining longer than any
realistic instance_id value. SQLite path is unaffected.
Signed-off-by: Jiale Zhang <xinjian.zjl@alibaba-inc.com>1 parent ce92d9d commit 312088a
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
0 commit comments