Skip to content

修复mysql meta文件记录出错可能存在重启后重复读取数据的问题 - #627

Merged
wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:sqlmetafix
Jul 23, 2018
Merged

wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:sqlmetafix

Conversation

@redHJ

@redHJ redHJ commented Jul 23, 2018 •

Copy link
Copy Markdown
Collaborator

meta重复记录问题修复
@wonderflow

Comment thread reader/sql/sql.go
return lastDB, lastTable, true
}

omitDoneDBRecords = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认不是false吗?true的时候你直接return了

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为现在出错的时候会continue,不是直接return true了

Comment thread reader/sql/sql_test.go Outdated
mrCron.SyncMeta()
mrCron.Close()
//mrCron.SyncMeta()
//mrCron.Close()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么注释了

@wonderflow

Copy link
Copy Markdown
Contributor

LGTM

@wonderflow
wonderflow merged commit 4cdcbdd into qiniu:master Jul 23, 2018
@wonderflow wonderflow changed the title meta fix 修复mysql meta文件记录出错可能存在重启后重复读取数据的问题 Jul 23, 2018
@redHJ
redHJ deleted the sqlmetafix branch January 10, 2019 06:13
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

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址