feat: 添加对 Kafka CurrentStatusrestart 值支持,更新 G5 入库逻辑及相关测试

This commit is contained in:
2026-03-18 09:47:33 +08:00
parent 1329eca99e
commit 381080fee0
9 changed files with 97 additions and 16 deletions

View File

@@ -41,10 +41,10 @@ G5库结构双写临时接入
差异字段:
- guid 为 int4由库自己生成。
- record_source 固定为 CRICS。
- current_status 为 int2on映射为1off映射为2其余为0。
- current_status 为 int2on映射为1off映射为2restart映射为3其余为0。
支持通过环境变量开关双写。
4. 数据处理规则
非重启数据reboot_reason 为空或不存在current_status 取 CurrentStatus
重启数据reboot_reason 不为空current_status 固定为 on
重启数据reboot_reason 不为空时保留 Kafka 上游 current_status 值;若上游值为 restart则入库标记为 restartG5 库映射为 3
其余字段直接按 Kafka 原值落库,空值不补 0