Breaking changes: The v1.10.0 is not fully compatible with the older QueryPrepared result · Issue #535 · dtm-labs/dtm · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
问题场景
使用csharp的sdk开发MSG模式, 抄sample中QueryPrepared代码实现,当配置的Barrier表连接串有问题(如数据库账号没有写权现),DTM状态误变成commited.
问题分析
v1.9.1时候,body不包含dtmcli三个参量ResultSuccess、ResultFailure、ResultOngoing的QueryPrepared会当成
getting result failed
,如http200 body:{ dtm_result: "MySql connection timeout, balabala... " }
,走touchCronTime。v1.10.0后使用新的规则升级指南 1.9.x 升级到 1.10.x
SDK与服务端判断 SUCCESS http:状态码 200 && 结果不包含 FAILURE|ONGOING; grpc:err == nil
,上面http200示例会当成正常,走设置成Submitted。因此,1.10.0并没有完全的兼容之前的QueryPrepared返回值。 c# 这边QueryPrepared方法只封装了BranchBarrier实现,没封装到http状态码级别。Sample中也一直按照v1.10.0之前的协议以http200靠body区分状态。
dtmcli-csharp-sample/DtmSample/DtmSample/Controllers/MsgTestController.cs at main · dtm-labs/dtmcli-csharp-sample
建议
v1.10.0发布到现在的时间跨度已经很大,已经无法做到两面都兼容,建议:
0e59ccb ("change to new error protocal ok", 2022-01-10)
。双向兼容仅限go sdk,其他需要自己核实The text was updated successfully, but these errors were encountered: