Aggregate 模型,除主键 _id 外的业务字段均使用 REPLACE NULL,数据使用 StreamLoad 导入。
生产环境中:偶现使用 _id 查询 与使用 业务唯一字段 查询的结果中,所有 Array 类型均不一致(像是错乱到其他数据上了),但其他类型字段正确。
例如:
使用 _id Aggregate 主键查询:
select * from base_db535227d90a4146a14260e99dabf841 where _id="66e3de28a0f3e917dfe32250"\G;
查询结果为:
*************************** 1. row ***************************
_id: 66e3de28a0f3e917dfe32250
_createdDate: 2024-09-13 14:39:38
_lastModifiedDate: 2024-09-13 15:01:00
_version: 10
_createdBy: 00000000-0000-0000-0000-000000000000
_lastModifiedBy: 3983c40a-18c9-4dfd-aee4-f5834dfb899d
_organizationId: 6a198491-cfe7-4511-9608-63903a6f882e
_state: NULL
id: 189028
entryId: 189464
docNum: MO088479
orderType: ["664ed35332786561b5db1b90"]
typeEnum: ["dianji"]
typeExtract: dianji
prodOrg: xxxx公司
docDate: 2024-09-13 00:00:00
prodArea:
matCode: ["6656754b37b71872c40fc071"]
matCodeText: 30122010228
使用 docNum 业务唯一字段查询:
select * from base_db535227d90a4146a14260e99dabf841 where docNum = "MO088479"\G;
查询结果为:
*************************** 1. row ***************************
_id: 66e3de28a0f3e917dfe32250
_createdDate: 2024-09-13 14:39:38
_lastModifiedDate: 2024-09-13 15:01:00
_version: 10
_createdBy: 00000000-0000-0000-0000-000000000000
_lastModifiedBy: 3983c40a-18c9-4dfd-aee4-f5834dfb899d
_organizationId: 6a198491-cfe7-4511-9608-63903a6f882e
_state: NULL
id: 189028
entryId: 189464
docNum: MO088479
orderType: ["664ed34717cc0f5c03bcea4b"]
typeEnum: ["xianquan"]
typeExtract: dianji
prodOrg: xxxx公司
docDate: 2024-09-13 00:00:00
prodArea:
matCode: ["6656766537b71872c40fd351"]
matCodeText: 30122010228
以上使用 _id 查询的结果是正确的,使用 docNum 业务唯一字段查询的结果中, orderType、typeEnum、matCode 这类 Array 类型数据错乱不一致,其余类型字段值均一致正确。
该问题在生产环境中偶发出现,测试 2.1.4 与 2.0.12 均存在该问题