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

Add a channel-based interface for sink to allow batch processing #75

Closed
wants to merge 7 commits into from
Closed

Add a channel-based interface for sink to allow batch processing #75

wants to merge 7 commits into from

Conversation

suzaku
Copy link
Contributor

@suzaku suzaku commented Oct 29, 2019

What problem does this PR solve?

With Emit we can only process txn.Txns one by one.

What is changed and how it works?

  1. Add channel based methods into the interface
  2. Remove unused methods

The original Emit method is still kept so that I don't have to rewrite large part of the old code.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

@suzaku suzaku added the WIP label Oct 29, 2019
@suzaku suzaku added status/ptal Could you please take a look? and removed WIP labels Oct 29, 2019
@suzaku
Copy link
Contributor Author

suzaku commented Oct 29, 2019

/run-all-tests

return s.successC
}

func (s *mysqlSink) Error() <-chan error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we don't use Error now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we are writing to the database asynchronously, we need a way to let the callers know what's wrong? Like syncers in Binlog?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I understand the effect of errorC, but when Emit returns an error, should we put the failed Txn into errorC?

@suzaku suzaku added WIP and removed status/ptal Could you please take a look? labels Oct 30, 2019
@suzaku
Copy link
Contributor Author

suzaku commented Dec 17, 2019

Replaced by #182

@suzaku suzaku closed this Dec 17, 2019
amyangfei pushed a commit to amyangfei/tiflow that referenced this pull request May 6, 2022
* add demotask server and client

* remove the temp data files

* fix the make check error

* fix the some errors case
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