iflytek/astron-agent · error · BusinessException
8513
8513
Error message
database.table.update.failed
What it means
Generic failure thrown by DatabaseService.updateTable when any part of the table update fails — the outer catch (Exception) at line 464-467 rethrows as DATABASE_TABLE_UPDATE_FAILED. This includes DDL generation, remote execDDL against the core system, and metadata updates. Root cause is logged at info level ('Failed to update table').
Solutions
- Check backend logs for 'Failed to update table, params=' to find the root cause
- Verify the core system service is reachable and execDDL succeeds
- Avoid reserved keywords and unsupported types in renamed/new fields
- Confirm the physical table still exists in the target database and DDL privileges are granted
- Retry after correcting the underlying issue
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight: unique name, valid field names/types, no reserved keywords assert !RESERVED_KEYWORDS.contains(newName.toUpperCase());
Try / catch
try {
databaseService.updateTable(dto);
} catch (BusinessException e) {
// inspect server log 'Failed to update table, params=' for root cause
log.error("updateTable failed for id={}", dto.getId(), e);
throw e;
} Prevention
- Avoid reserved keywords in renamed/new column names
- Verify core system execDDL availability before batch updates
- Confirm physical DDL privileges on the target database
- Don't manually drop physical tables that are managed by the platform
When it happens
Trigger: Any exception in updateTable: physical DDL rejected (rename to existing physical table, invalid column type/name, reserved keywords), core system execDDL failure, permission/data check failure, or concurrent update conflicts.
Common situations: Renaming a column to a reserved SQL keyword; core system service unavailable; target database rejects ALTER statements (insufficient DDL privileges on the physical DB); updating a table whose physical counterpart was dropped manually.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/f12a2f3581f02d29.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/database/DatabaseService.java:466
}
}
}
if (StringUtils.isNotBlank(dbTableDto.getName())) {
dbTable.setName(dbTableDto.getName());
}
if (StringUtils.isNotBlank(dbTableDto.getDescription())) {
dbTable.setDescription(dbTableDto.getDescription());
}
dbTable.setUpdateTime(new Date());
dbTableMapper.updateById(dbTable);
String userId = UserInfoManagerHandler.getUserId();
for (String stmt : safeSplitStatements(ddl)) {
coreSystemService.execDDL(stmt, userId, SpaceInfoUtil.getSpaceId(), dbInfo.getDbId());
}
} catch (Exception ex) {
log.info("Failed to update table, params={}", dbTableDto.toString(), ex);
throw new BusinessException(ResponseEnum.DATABASE_TABLE_UPDATE_FAILED);
}
}
private String buildDDL(DbTableDto dbTableDto, Integer type, String originTbName) {
StringBuilder ddl = new StringBuilder();
if (DBOperateEnum.INSERT.getCode().equals(type)) {
List<DbTableFieldDto> fields = dbTableDto.getFields()
.stream()
.filter(f -> !Arrays.asList(SYSTEM_FIELDS).contains(f.getName()))
.collect(Collectors.toList());
List<ColumnDef> columns = fields.stream()
.map(f -> new ColumnDef(
f.getName(),
transFormType(f.getType()),
Boolean.TRUE.equals(f.getIsRequired()),
StringUtils.isNotBlank(f.getDefaultValue())View on GitHub (pinned to 5e758547a8)