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

enh: connector implements autocommit #227

Merged
merged 1 commit into from
Dec 25, 2023
Merged

enh: connector implements autocommit #227

merged 1 commit into from
Dec 25, 2023

Conversation

huskar-t
Copy link
Collaborator

No description provided.

c.nextAutoCommitTime = time.Now().Add(c.autoCommitInterval)
} else {
if time.Now().After(c.nextAutoCommitTime) {
c.doCommit()
Copy link
Contributor

Choose a reason for hiding this comment

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

这样不兼容以前Adapter接口了,就是go的连接器没法调用老版本的Adapter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

each go connector release has a minimum tdengine version requirement

offset, err = consumer.Committed(partitions, 0)
assert.NoError(t, err)
assert.Equal(t, 1, len(offset))
assert.GreaterOrEqual(t, offset[0].Offset, messageOffset)
Copy link
Contributor

Choose a reason for hiding this comment

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

测试用例只有一条数据,第一次拉取成功后,后面其实无法验证是否自动提交触发。

Copy link
Contributor

@sheyanjie-qq sheyanjie-qq left a comment

Choose a reason for hiding this comment

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

OK

@huskar-t huskar-t merged commit 9dd19ef into 3.0 Dec 25, 2023
3 checks passed
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