OMS增量数据不一致问题

【 使用环境 】生产环境
【 OB or 其他组件 】OMS
【 使用版本 】4.2.2_CE
OB 4.x
mysql 5.7.25
OB-> Mysql

OB同步到mysql,出现数据不一致问题,下游记录了所有表的SQL语句,
表schema

针对出错的这一行,当前OB中的数据是

24377:gifshow.pay_order_77 30190552 2415200092889077 2415200092889077 0 2415200092894077 40 999 CNY 0 1717129617277 1717129783017 1 OSP667940130167654577 2000 CSPiup625334654308715871 {“accountGroupKey”:null,“accountId”:“872484077”,“attach”:"{“1”:872484077,“2”:1,“3”:0}",“code”:null,“createTime”:null,“currencyType”:“CNY”,“data”:"{“GUIDE_INFO”:{“out_order_no”:“2415200092894077”,“sign_agreement”:{“sign_product”:“FAMILY_CARD”,“account_id”:“872484077”,“agreement_type”:“PASSWORD_FREE”,“provider”:“ALIPAY”,“merchant_id”:“GM712131691323525399”,“source”:“FROM_KUAISHOU_AFTER_PAY”,“account_group_key”:“BUYER_AGREEMENT”}},“PAY_AMOUNT_INFO”:{“kspay_promo_discount_amount”:0,“book_balance_pay_amount”:0,“actual_pay_amount”:8634,“provider_promo_discount_amount”:0},“CASHIER_SOURCE_TAG”:“INTEGRATE_IN_APP”,“GATEWAY_FUND_BILL”:"{\“provider\”:\“ALIPAY\”,\“amount\”:999,\“actual_pay_amount\”:999,\“payment_method\”:\“IN_APP\”,\“provider_trade_no\”:\“CSPiup625334654308715871\”,\“provider_pay_amount\”:8634,\“book_balance_pay_amount\”:0,\“provider_user_id\”:\“2088502451695511\”,\“provider_channel_type\”:\“NORMAL\”}",“MERGE_PAY_INFO”:"{}",“OUT_SETTLE_PARAM”:{“settle_params”:[{“amount”:2000,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“家会香生巧福团(全场满19.9包邮)”,“leaf_category_id”:“1165”,“goods_quantity”:20,“goods_category”:“其他零食/坚果/特产”,“goods_id”:“20257194906912”,“goods_type”:“PHY”,“goods_unit_price”:100,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092886077”},{“amount”:399,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“金币巧克力(全场满19.9包邮)”,“leaf_category_id”:“8311”,“goods_quantity”:1,“goods_category”:“DIY/手工巧克力”,“goods_id”:“15475706072912”,“goods_type”:“PHY”,“goods_unit_price”:399,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092888077”},{“amount”:1588,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“景旭鱿鱼仔半籽250克(全场满19.9包邮)”,“leaf_category_id”:“8300”,“goods_quantity”:1,“goods_category”:“其他即食水产/海味零食”,“goods_id”:“3781711965912”,“goods_type”:“PHY”,“goods_unit_price”:1588,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092890077”},{“amount”:1596,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1346”,“goods_name”:“749同福记酸辣粉135克(全场满19.9包邮)”,“leaf_category_id”:“8186”,“goods_quantity”:4,“goods_category”:“冲泡方便面/拉面/面皮/面饼”,“goods_id”:“21910338805912”,“goods_type”:“PHY”,“goods_unit_price”:399,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092892077”},{“amount”:552,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“769小腿王鸭翅根(全场满19.9包邮)”,“leaf_category_id”:“8279”,“goods_quantity”:4,“goods_category”:“鸡肉制品”,“goods_id”:“21446373232912”,“goods_type”:“PHY”,“goods_unit_price”:138,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092887077”},{“amount”:999,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“591熊三岁巧克力脆筒328克(全场满19.9包邮)”,“leaf_category_id”:“8311”,“goods_quantity”:1,“goods_category”:“DIY/手工巧克力”,“goods_id”:“21186893597912”,“goods_type”:“PHY”,“goods_unit_price”:999,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092889077”},{“amount”:1500,“receiver_params_post_position”:true,“seller_account_id”:“533844912”,“goods_infos”:[{“first_category_id”:“1164”,“goods_name”:“百 吉福奶酪棒单支(全场满19.9包邮)”,“leaf_category_id”:“1165”,“goods_quantity”:10,“goods_category”:“其他零食/坚果/特产”,“goods_id”:“21076287502912”,“goods_type”:“PHY”,“goods_unit_price”:150,“has_buy_insurance”:false}],“account_group_key”:“MERCHANT_SELLER”,“out_sub_order_no”:“2415200092891077”}],“need_merge_pay”:true}}",“merchantId”:“GM712131691323525399”,“msg”:null,“notifyTime”:1717129617286,“oppositeAccount”:null,“oppositeAccountName”:null,“orderAmount”:999,“orderPayNo”:“OSP667940130167654577”,“orderState”:“SUCCESS”,“orderStateDesc”:“支付成功”,“outOrderNo”:“2415200092894077”,“paymentTime”:1717129617277,“settleChannel”:“KSPAY_GATEWAY”,“sign”:null,“version”:“1.0”} KWAISHOP 533844912 533844912 872484077 {“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“refunds”:[{“refundFee”:999,“refundOutBizNo”:“2415200161516077_FEO1619023515”,“refundPrepaidCardAmount”:0}],“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false} 0 2 1717129603185 1717129689004 1 {“agreementType”:“PASSWORD_FREE”,“payChannelCode”:“ALIPAY”,“paymentMethod”:“IN_APP”,“provider”:“ALIPAY”,“providerChannelType”:“NORMAL”,“providerProductCode”:“PINGAN_JZB”,“settleChannel”:“KSPAY_GATEWAY”} 0 999 0 2024-05-31 12:28:09

但是在下游MySQL中显示是

24377:gifshow.pay_order_77 | 30190552 | 2415200092889077 | 2415200092889077 | 0 | 2415200092894077 | 40 | 999 | CNY | 0 | | 1717129617277 | 1717129783017 | 1 | OSP667940130167654577 | 2000 | CSPiup625334654308715871 | | KWAISHOP | 533844912 | 533844912 | 872484077 | {“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“refunds”:[{“refundFee”:999,“refundOutBizNo”:“2415200161516077_FEO1619023515”,“refundPrepaidCardAmount”:0}],“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false} | 0 | | 2 | 1717129603185 | 1717129689004 | 1 | {“agreementType”:“PASSWORD_FREE”,“payChannelCode”:“ALIPAY”,“paymentMethod”:“IN_APP”,“provider”:“ALIPAY”,“providerChannelType”:“NORMAL”,“providerProductCode”:“PINGAN_JZB”,“settleChannel”:“KSPAY_GATEWAY”} | 0 | | 999 | 0 | | 2024-05-31 12:28:09 |

下面是对这一行的所有更新语句,最后一次UPDATE操作将pay_gate_notify_info设置成了NULL,其它的值更新能够对应上,这样的错误不止出现这一行,在OB中是有对应的值的,上下游的数据不一致

INSERT INTO kwaishoppaycenterpayorder.pay_order (_hd_shard,id,pay_order_id,order_id,sub_order_id,cart_id,status,pay_fee,currency_type,discount_amount,discount_detail,pay_time,pay_timeout,pay_gate,pay_gate_oid,pay_channel,pay_channel_oid,pay_gate_notify_info,business_line,shop_id,seller_id,buyer_id,attributes,attributes_cc,return_data,version,create_time,update_time,pay_biz_type,pay_channel_detail,sub_status,pay_scene,actual_pay_fee,pay_balance,pay_balance_detail,ob_modify_time) VALUES (‘24377:gifshow.pay_order_77’,‘30190546’,‘2415200092894077’,‘2415200092894077’,‘0’,‘2415200092894077’,‘10’,‘8634’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘0’,‘0’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:2,“grayType”:1,“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:8634,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190549’,‘2415200092890077’,‘2415200092890077’,‘0’,‘2415200092894077’,‘10’,‘1588’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:3781711965912,“skuNum”:1,“skuPrice”:1588},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:1588,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190548’,‘2415200092888077’,‘2415200092888077’,‘0’,‘2415200092894077’,‘10’,‘399’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:15475706072912,“skuNum”:1,“skuPrice”:399},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:399,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190553’,‘2415200092891077’,‘2415200092891077’,‘0’,‘2415200092894077’,‘10’,‘1500’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21076287502912,“skuNum”:10,“skuPrice”:150},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:1500,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190550’,‘2415200092892077’,‘2415200092892077’,‘0’,‘2415200092894077’,‘10’,‘1596’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21910338805912,“skuNum”:4,“skuPrice”:399},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:1596,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190547’,‘2415200092886077’,‘2415200092886077’,‘0’,‘2415200092894077’,‘10’,‘2000’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:20257194906912,“skuNum”:20,“skuPrice”:100},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:2000,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190551’,‘2415200092887077’,‘2415200092887077’,‘0’,‘2415200092894077’,‘10’,‘552’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21446373232912,“skuNum”:4,“skuPrice”:138},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:552,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’),(‘24377:gifshow.pay_order_77’,‘30190552’,‘2415200092889077’,‘2415200092889077’,‘0’,‘2415200092894077’,‘10’,‘999’,‘CNY’,‘0’,null,‘0’,‘1717129783017’,‘1’,’’,‘0’,’’,null,‘KWAISHOP’,‘533844912’,‘533844912’,‘872484077’,’{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’,‘0’,’’,‘0’,‘1717129603185’,‘1717129603185’,‘1’,null,‘0’,’’,‘0’,‘0’,null,‘2024-05-31 12:26:43’)

PDATE kwaishoppaycenterpayorder.pay_order SET _hd_shard = ‘24377:gifshow.pay_order_77’, id = ‘30190552’, pay_order_id = ‘24152 00092889077’, order_id = ‘2415200092889077’, sub_order_id = ‘0’, cart_id = ‘2415200092894077’, status = ‘20’, pay_fee = ‘999’, currency_type = ‘CNY’, discount_amount = ‘0’, discount_detail = null, pay_time = ‘1717129617277’, pay_timeout = ‘1717129783017’, pay_gate = ‘1’, pay_gate_oid = ‘OSP667940130167654577’, pay_channel = ‘2000’, pay_channel_oid = ‘CSPiup625334654308715871’, pay_gate_notify_info = ‘{“accountGroupKey” :null,“accountId”:“872484077”,“attach”:"{\“1\”:872484077,\“2\”:1,\“3\”:0}",“code”:null,“createTime”:null,“currencyType”:“CNY”,“data”:"{\“GUIDE_INFO\”:{\“out_order_no\”:\“2415200092894077\”,\“sign_agreement\”:{\" sign_product\":\“FAMILY_CARD\”,\“account_id\”:\“872484077\”,\“agreement_type\”:\“PASSWORD_FREE\”,\“provider\”:\“ALIPAY\”,\“merchant_id\”:\“GM712131691323525399\”,\“source\”:\“FROM_KUAISHOU_AFTER_PAY\”,\ “account_group_key\”:\“BUYER_AGREEMENT\”}},\“PAY_AMOUNT_INFO\”:{\“kspay_promo_discount_amount\”:0,\“book_balance_pay_amount\”:0,\“actual_pay_amount\”:8634,\“provider_promo_discount_amount\”:0},\“CASHIER_SOURCE_TA G\”:\“INTEGRATE_IN_APP\”,\“GATEWAY_FUND_BILL\”:\"{\\\“provider\\\”:\\\“ALIPAY\\\”,\\\“amount\\\”:999,\\\“actual_pay_amount\\\”:999,\\\“payment_method\\\”:\\\“IN_APP\\\”,\\\“provider _trade_no\\\”:\\\“CSPiup625334654308715871\\\”,\\\“provider_pay_amount\\\”:8634,\\\“book_balance_pay_amount\\\”:0,\\\“provider_user_id\\\”:\\\“2088502451695511\\\”,\\\“provider_channel_type\ \\”:\\\“NORMAL\\\”}\",\“MERGE_PAY_INFO\”:\"{}\",\“OUT_SETTLE_PARAM\”:{\“settle_params\”:[{\“amount\”:2000,\“receiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_infos\”:[ {\“first_category_id\”:\“1164\”,\“goods_name\”:\“家会香生巧福团(全场满19.9包邮)\”,\“leaf_category_id\”:\“1165\”,\“goods_quantity\”:20,\“goods_category\”:\“其他零食/坚果/特产\”,\“goods_id\”:\“202571949069 12\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:100,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\“out_sub_order_no\”:\“2415200092886077\”},{\“amount\”:399,\“receiver_params_post _position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_infos\”:[{\“first_category_id\”:\“1164\”,\“goods_name\”:\“金币巧克力(全场满19.9包邮)\”,\“leaf_category_id\”:\“8311\”,\“goods_quantity\”:1,\“g oods_category\”:\“DIY/手工巧克力\”,\“goods_id\”:\“15475706072912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:399,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\"out_sub_order_no\ “:\“2415200092888077\”},{\“amount\”:1588,\“receiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_infos\”:[{\“first_category_id\”:\“1164\”,\“goods_name\”:\“景旭鱿鱼仔半籽250克(全> 场满19.9包邮)\”,\“leaf_category_id\”:\“8300\”,\“goods_quantity\”:1,\“goods_category\”:\“其他即食水产/海味零食\”,\“goods_id\”:\“3781711965912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:1588,\“has_buy_i nsurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\“out_sub_order_no\”:\“2415200092890077\”},{\“amount\”:1596,\“receiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_info s\”:[{\“first_category_id\”:\“1346\”,\“goods_name\”:\“749同福记酸辣粉135克(全场满19.9包邮)\”,\“leaf_category_id\”:\“8186\”,\“goods_quantity\”:4,\“goods_category\”:\“冲泡方便面/拉面/面皮/面饼\”,\“goods_id\ “:\“21910338805912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:399,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\“out_sub_order_no\”:\“2415200092892077\”},{\“amount\”:552,\“re ceiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_infos\”:[{\“first_category_id\”:\“1164\”,\“goods_name\”:\“769小腿王鸭翅根(全场满19.9包邮)\”,\“leaf_category_id\”:\“8279\”,\“g oods_quantity\”:4,\“goods_category\”:\“鸡肉制品\”,\“goods_id\”:\“21446373232912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:138,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\” out_sub_order_no\”:\“2415200092887077\”},{\“amount\”:999,\“receiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\”,\“goods_infos\”:[{\“first_category_id\”:\“1164\”,\“goods_name\”:\“591熊三> 岁巧克力脆筒328克(全场满19.9包邮)\”,\“leaf_category_id\”:\“8311\”,\“goods_quantity\”:1,\“goods_category\”:\“DIY/手工巧克力\”,\“goods_id\”:\“21186893597912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:99 9,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\“out_sub_order_no\”:\“2415200092889077\”},{\“amount\”:1500,\“receiver_params_post_position\”:true,\“seller_account_id\”:\“533844912\” ,\“goods_infos\”:[{\“first_category_id\”:\“1164\”,\“goods_name\”:\“百 吉福奶酪棒单支(全场满19.9包邮)\”,\“leaf_category_id\”:\“1165\”,\“goods_quantity\”:10,\“goods_category\”:\“其他零食/坚果/特产\”,\“good s_id\”:\“21076287502912\”,\“goods_type\”:\“PHY\”,\“goods_unit_price\”:150,\“has_buy_insurance\”:false}],\“account_group_key\”:\“MERCHANT_SELLER\”,\“out_sub_order_no\”:\“2415200092891077\”}],\“need_merge_pay \”:true}}”,“merchantId”:“GM712131691323525399”,“msg”:null,“notifyTime”:1717129617286,“oppositeAccount”:null,“oppositeAccountName”:null,“orderAmount”:999,“orderPayNo”:“OSP667940130167654577”,“orderState”:“SUCCESS”,“orderStateD esc”:“支付成功”,“outOrderNo”:“2415200092894077”,“paymentTime”:1717129617277,“settleChannel”:“KSPAY_GATEWAY”,“sign”:null,“version”:“1.0”}’, business_line = ‘KWAISHOP’, shop_id = ‘533844912’, seller_id = ‘533844912’, buye r_id = ‘872484077’, attributes = ‘{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“ca rrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTo talPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45 c8-8287-4f2015440ab2”,“zeroOrder”:false}’, attributes_cc = ‘0’, return_data = ‘’, version = ‘1’, create_time = ‘1717129603185’, update_time = ‘1717129617341’, pay_biz_type = ‘1’, pay_channel_detail = ‘{“agreement Type”:“PASSWORD_FREE”,“payChannelCode”:“ALIPAY”,“paymentMethod”:“IN_APP”,“provider”:“ALIPAY”,“providerChannelType”:“NORMAL”,“providerProductCode”:“PINGAN_JZB”,“settleChannel”:“KSPAY_GATEWAY”}’, sub_status = ‘0’, pay_scene = ‘’, actual_pay_fee = ‘999’, pay_balance = ‘0’, pay_balance_detail = null, ob_modify_time = ‘2024-05-31 12:26:57’ WHERE _hd_shard = ‘24377:gifshow.pay_order_77’ and id = ‘30190552’ and pay_order_id = ‘2415200092 889077’ and order_id = ‘2415200092889077’ and sub_order_id = ‘0’ and cart_id = ‘2415200092894077’ and status = ‘10’ and pay_fee = ‘999’ and currency_type = ‘CNY’ and discount_amount = ‘0’ and discount_detail is null and pay_time = ‘0’ and pay_timeout = ‘1717129783017’ and pay_gate = ‘1’ and pay_gate_oid = ‘’ and pay_channel = ‘0’ and pay_channel_oid = ‘’ and pay_gate_notify_info is null and business_line = ‘KWAISHOP’ and shop_id = ‘533844912’ and seller_id = ‘533844912’ and buyer_id = ‘872484077’ and attributes = ‘{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077,24 15200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payLoca tionType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSelect PaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’ and attributes_cc = ‘0’ and return_data = ‘’ and version = ‘0’ and create_time = ‘1717129603185’ and upd ate_time = ‘1717129603185’ and pay_biz_type = ‘1’ and pay_channel_detail is null and sub_status = ‘0’ and pay_scene = ‘’ and actual_pay_fee = ‘0’ and pay_balance = ‘0’ and pay_balance_detail is null and ob_modi fy_time = ‘2024-05-31 12:26:43’ LIMIT 1

UPDATE kwaishoppaycenterpayorder.pay_order SET _hd_shard = ‘24377:gifshow.pay_order_77’, id = ‘30190552’, pay_order_id = ‘24152 00092889077’, order_id = ‘2415200092889077’, sub_order_id = ‘0’, cart_id = ‘2415200092894077’, status = ‘40’, pay_fee = ‘999’, currency_type = ‘CNY’, discount_amount = ‘0’, discount_detail = null, pay_time = ‘1717129617277’, pay_timeout = ‘1717129783017’, pay_gate = ‘1’, pay_gate_oid = ‘OSP667940130167654577’, pay_channel = ‘2000’, pay_channel_oid = ‘CSPiup625334654308715871’, pay_gate_notify_info = null, business_lin e = ‘KWAISHOP’, shop_id = ‘533844912’, seller_id = ‘533844912’, buyer_id = ‘872484077’, attributes = ‘{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,2415200092887077 ,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“orderType”:0,“payL ocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“ALIPAY”,“preSel ectPaymentMethod”:“IN_APP”,“refunds”:[{“refundFee”:999,“refundOutBizNo”:“2415200161516077_FEO1619023515”,“refundPrepaidCardAmount”:0}],“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’, attributes_cc = ‘0’, return_data = ‘’, version = ‘2’, create_time = ‘1717129603185’, update_time = ‘1717129689004’, pay_biz_type = ‘1’, pay_channel_detail = ‘{“agreementType”:“PASSWORD_FREE”,“payChannelCode”:“ALIP AY”,“paymentMethod”:“IN_APP”,“provider”:“ALIPAY”,“providerChannelType”:“NORMAL”,“providerProductCode”:“PINGAN_JZB”,“settleChannel”:“KSPAY_GATEWAY”}’, sub_status = ‘0’, pay_scene = ‘’, actual_pay_fee = ‘999’, pay_balance = ‘0’, pay_balance_detail = null, ob_modify_time = ‘2024-05-31 12:28:09’ WHERE _hd_shard = ‘24377:gifshow.pay_order_77’ and id = ‘30190552’ and pay_order_id = ‘2415200092889077’ and order_id = ‘2415200092889077’ and sub_order_id = ‘0’ and cart_id = ‘2415200092894077’ and status = ‘20’ and pay_fee = ‘999’ and currency_type = ‘CNY’ and discount_amount = ‘0’ and discount_detail is null and pay_time = ‘1717129617277’ and pay_timeout = ‘1717129783017’ and pay_gate = ‘1’ and pay_gate_oid = ‘OSP667940130167654577’ and pay_channel = ‘2000’ and pay_channel_oid = ‘CSPiup625334654308715871’ and pay_gate_notify_info is null and business_li ne = ‘KWAISHOP’ and shop_id = ‘533844912’ and seller_id = ‘533844912’ and buyer_id = ‘872484077’ and attributes = ‘{“bathRelationSubPayOrderIds”:[2415200092886077,2415200092888077,2415200092890077,2415200092892077,241 5200092887077,2415200092889077,2415200092891077],“budgetReduceTag”:0,“carrierInfo”:{“carrierId”:0,“carrierType”:0},“cpsInfo”:{“distributorId”:0},“grayType”:1,“itemDTO”:{“itemId”:21186893597912,“skuNum”:1,“skuPrice”:999},“order Type”:0,“payLocationType”:2000,“payOrderFeeDTO”:{“expressFee”:0,“goodsFee”:999,“orderTotalPaymentFee”:0},“payServiceAbility”:0,“payServiceScene”:0,“payTag”:“00000001”,“pinganB2bLargeAmountOrder”:false,“preSelectPayChannel”:“AL IPAY”,“preSelectPaymentMethod”:“IN_APP”,“relateOrderId”:0,“sessionId”:“69bf1fbb-94f1-45c8-8287-4f2015440ab2”,“zeroOrder”:false}’ and attributes_cc = ‘0’ and return_data = ‘’ and version = ‘1’ and create_time = ‘1717129 603185’ and update_time = ‘1717129617341’ and pay_biz_type = ‘1’ and pay_channel_detail = ‘{“agreementType”:“PASSWORD_FREE”,“payChannelCode”:“ALIPAY”,“paymentMethod”:“IN_APP”,“provider”:“ALIPAY”,“providerChannelType”:“NO RMAL”,“providerProductCode”:“PINGAN_JZB”,“settleChannel”:“KSPAY_GATEWAY”}’ and sub_status = ‘0’ and pay_scene = ‘’ and actual_pay_fee = ‘999’ and pay_balance = ‘0’ and pay_balance_detail is null and ob_modify_time = ‘2024-05-31 12:26:57’ LIMIT 1

【问题描述】

我看建表语句,跟Insert,update当中的字段怎么对不上,没有ob_modify_time这个字段

这个是后来在上游加的,为了验证数据更新的问题。OMS没有选择同步DDL

那个schema是昨天的。

CREATE TABLE pay_order (
_hd_shard varchar(128) NOT NULL DEFAULT ‘’ COMMENT ‘shard info’,
id bigint(20) unsigned NOT NULL,
pay_order_id bigint(20) unsigned DEFAULT NULL,
order_id bigint(20) unsigned DEFAULT NULL,
sub_order_id bigint(20) unsigned DEFAULT NULL,
cart_id bigint(20) unsigned DEFAULT NULL,
status tinyint(3) unsigned DEFAULT NULL,
pay_fee bigint(20) unsigned DEFAULT NULL,
currency_type varchar(50) DEFAULT NULL,
discount_amount bigint(20) DEFAULT NULL,
discount_detail longtext DEFAULT NULL,
pay_time bigint(20) unsigned DEFAULT NULL,
pay_timeout bigint(20) unsigned DEFAULT NULL,
pay_gate int(11) unsigned DEFAULT NULL,
pay_gate_oid varchar(255) DEFAULT NULL,
pay_channel int(11) unsigned DEFAULT NULL,
pay_channel_oid varchar(255) DEFAULT NULL,
pay_gate_notify_info longtext DEFAULT NULL,
business_line varchar(32) DEFAULT NULL,
shop_id bigint(20) unsigned DEFAULT NULL,
seller_id bigint(20) unsigned DEFAULT NULL,
buyer_id bigint(20) unsigned DEFAULT NULL,
attributes longtext DEFAULT NULL,
attributes_cc int(11) unsigned DEFAULT NULL,
return_data text DEFAULT NULL,
version int(11) unsigned DEFAULT NULL,
create_time bigint(20) unsigned DEFAULT NULL,
update_time bigint(20) unsigned DEFAULT NULL,
pay_biz_type int(10) unsigned DEFAULT NULL,
pay_channel_detail longtext DEFAULT NULL,
sub_status int(11) unsigned DEFAULT NULL,
pay_scene varchar(32) DEFAULT NULL,
actual_pay_fee bigint(20) unsigned DEFAULT NULL,
pay_balance bigint(20) unsigned DEFAULT NULL,
pay_balance_detail longtext DEFAULT NULL,
ob_modify_time timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id, _hd_shard),
UNIQUE KEY uniq_pay_order_id (pay_order_id, id) BLOCK_SIZE 16384 LOCAL,
KEY idx_buyer_id_cart_id (buyer_id, cart_id) BLOCK_SIZE 16384 LOCAL,
KEY idx_pay_order_id_buyer_id_global (pay_order_id, buyer_id) BLOCK_SIZE 16384 GLOBAL
partition by key(pay_order_id)

这是新的建表语句

我本地MOCK你的表,在update的时候没有出现这种问题,来源目标一致的,你当前场景是怎么样的,目标端有没有其他应用使用,我看你上面意思是来源端的值pay_gate_notify_info设置为null,目标端不是null?

OB里的值不是NULL,通过UPDATE语句同步过来是NULL,导致下游是NULL,上游不是NULL

当前的你那个链路还能复现吗,update来源这条数据pay_gate_notify_info字段的时候,目标端还是null

不是每一条都是这样,这只是我发现出来的

如果你还记得啥时候来源update这条数据的是话,进入OMS容器目录下:进入/home/ds/store/你当前项目的store的编号,进去之后cat drc.active.crawlers 开头的文件 ,会看到key为port的,拿到这个值放到下面的{port}中:
wget http://{当前机器ip}:{port}/{subtopic} --post-data “checkpoint={checkpoint}&filter.conditions={conditions}”

{subtopic}获取方式:在当前项目右上角-插件组件监控-store-更新-搜索subTopic-拿到 他的value就是
{checkpoint}:就是开始拉取的时间点(时间戳:2024-05-31 16:00:00开始就是1717142400)
{conditions}:需要过滤的条件,租户.库.table的格式按照你上述提供的应该是:租户.kwaishoppaycenterpayorder.pay_order

case:wget http://xxxx:xxx/OB_MYSQL_CE_np_5s3up1jfcx1c_5s3urcgj0o5c-1-0 --post-data “checkpoint=1717142400&filter.conditions=obmysql.test_db.pay_order”

执行完了之后,会在当前目录生成一个OB_MYSQL_CE开头的文件,vi 查看即可,里面有从你checkpoint开始里面来源表数据的一些变更记录,看是否符合预期

checkpoint选哪个?

checkpoint就是开始拉取的时间,比如,你16:00去update的,那么你checkpoint时间戳填16:00,则会拉取从16:00开始到现在的数据

能选个停止时间吗?这个文件太大了

例如我只想要 2024-05-31 12:28:09这个时间前后的,这个数据就在这个时间点更新的

我获取了一部分,但是看不懂

可以手动停止,你要12:28:09这个时间点的话,时间戳选择就是12:28:00开始就行,然后执行那个命令,会开始写入,写一会就行,手动ctrl+c停止即可,不用一致写到当前时间17.04

/关键字 即可,需要一条条看,比如你的字段pay_gate_notify_info

我怎么样找到我要的那一行的修改?

关键字搜:比如你pay_gate_notify_info字段里面的值,最好是唯一的那种,这样就更准确定位到数据