Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undo_log时区问题 #8

Open
xiaxiaosheng opened this issue Mar 21, 2022 · 1 comment
Open

undo_log时区问题 #8

xiaxiaosheng opened this issue Mar 21, 2022 · 1 comment

Comments

@xiaxiaosheng
Copy link

Issue description

mysql,表里包含timestamp字段时,回滚会失败,报错是:“ERROR check dirty datas failed, old and new data are not equal”
timestamp类型的字段都会不一致

Error log

2022-03-21T01:06:57.279+0800	ERROR	check dirty datas failed, old and new data are not equal, tableName:[`jt_erp_inventory`], oldRows:[[{"Fields":[{"Name":"id","KeyType":1,"Type":-5,"Value":403},{"Name":"user_id","KeyType":0,"Type":0,"Value":1011},{"Name":"operator_id","KeyType":0,"Type":0,"Value":1011},{"Name":"warehouse_id","KeyType":0,"Type":0,"Value":91},{"Name":"product_id","KeyType":0,"Type":0,"Value":41209},{"Name":"sku","KeyType":0,"Type":12,"Value":"QzA3MDgxNC0y"},{"Name":"useable_num","KeyType":0,"Type":0,"Value":9},{"Name":"order_lock_num","KeyType":0,"Type":0,"Value":1},{"Name":"pre_on_shelf","KeyType":0,"Type":0,"Value":0},{"Name":"on_shelf","KeyType":0,"Type":0,"Value":0},{"Name":"pre_out","KeyType":0,"Type":0,"Value":0},{"Name":"defective","KeyType":0,"Type":0,"Value":0},{"Name":"defective_pre_out","KeyType":0,"Type":0,"Value":0},{"Name":"on_way","KeyType":0,"Type":0,"Value":2},{"Name":"less","KeyType":0,"Type":0,"Value":0},{"Name":"less_start_time","KeyType":0,"Type":93,"Value":null},{"Name":"version","KeyType":0,"Type":0,"Value":23},{"Name":"create_time","KeyType":0,"Type":93,"Value":"2022-03-15T23:49:36+08:00"},{"Name":"last_update_time","KeyType":0,"Type":93,"Value":"2022-03-21T08:53:02+08:00"}]}]], newRows:[[{"Fields":[{"Name":"id","KeyType":1,"Type":-5,"Value":403},{"Name":"user_id","KeyType":0,"Type":0,"Value":1011},{"Name":"operator_id","KeyType":0,"Type":0,"Value":1011},{"Name":"warehouse_id","KeyType":0,"Type":0,"Value":91},{"Name":"product_id","KeyType":0,"Type":0,"Value":41209},{"Name":"sku","KeyType":0,"Type":12,"Value":"QzA3MDgxNC0y"},{"Name":"useable_num","KeyType":0,"Type":0,"Value":9},{"Name":"order_lock_num","KeyType":0,"Type":0,"Value":1},{"Name":"pre_on_shelf","KeyType":0,"Type":0,"Value":0},{"Name":"on_shelf","KeyType":0,"Type":0,"Value":0},{"Name":"pre_out","KeyType":0,"Type":0,"Value":0},{"Name":"defective","KeyType":0,"Type":0,"Value":0},{"Name":"defective_pre_out","KeyType":0,"Type":0,"Value":0},{"Name":"on_way","KeyType":0,"Type":0,"Value":2},{"Name":"less","KeyType":0,"Type":0,"Value":0},{"Name":"less_start_time","KeyType":0,"Type":93,"Value":null},{"Name":"version","KeyType":0,"Type":0,"Value":23},{"Name":"create_time","KeyType":0,"Type":93,"Value":"2022-03-15T15:49:36+08:00"},{"Name":"last_update_time","KeyType":0,"Type":93,"Value":"2022-03-21T00:53:02+08:00"}]}]].
2022-03-21T01:06:57.290+0800	ERROR	[stacktrace]branchRollback failed. xid:[aggSvc:9250340230840323], branchID:[9250340230840324], resourceID:[jt_inv_0001], branchType:[0], applicationData:[[]]
2022-03-21T01:06:57.290+0800	ERROR	Has dirty records when undo.

Configuration

Driver version (or git SHA):

*Go version: go1.17

*Server version: MySQL 5.7.18

*Server OS: OSX 11.5.2

@bohehe
Copy link

bohehe commented Mar 22, 2022

seata-go-samples也用到了timestamp类型的字段,但是没有这样的问题。
你说的时区问题具体是什么?能不能描述下具体的业务操作?
https://github.com/opentrx/seata-go-samples/blob/v2/gorm/scripts/seata_product.sql#L34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants