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

Replace Loader with Lightning #5833

Open
3 of 5 tasks
suzaku opened this issue Dec 6, 2019 · 3 comments
Open
3 of 5 tasks

Replace Loader with Lightning #5833

suzaku opened this issue Dec 6, 2019 · 3 comments
Assignees
Labels
difficulty/medium Medium task. TiDB-5.0 type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@suzaku
Copy link
Contributor

suzaku commented Dec 6, 2019

Description

Replace Loader with Lightning

Background

In DM, the loader.Loader struct implements loading data from mydumper output files into TiDB. Since v3.0.3, Lightning supports the TiDB backend, which enables Lightning to do the same thing.

Proposal

We consider the TiDB backend mode of Lightning the better implementation of the two, because:

  1. It has more complete parsing support that can succeed in cases loader.Loader would fail;
  2. It has more fine-grain concurrency control, allowing users to config read and write concurrency differently.

So we propose to replace Loader with Lightning.

Success Criteria

  • Reimplement loader.Loader (which is an implementation of the Unit interface) with Lightning;
  • Maintain backward-compatibility of config files like task.yaml

Category

Enhancement

Value

Enhance the ability of load data.

Score

1500

SIG slack channel

sig-migrate

Mentor

csuzhangxc

TODO list

  • Refactor Lightning to make the loader path usabale as a library in DM
  • A basic replacement of loader that implements essential methods of the Unit interface (eg. Init, Process) and leave the other methods with dummy implementations
  • Implement Close
  • Implement Pause and Resume
  • Implement Status, Error, Type, IsFreshTask

Documentations

Project

N/A

@suzaku suzaku added the type/feature-request Categorizes issue or PR as related to a new feature. label Dec 6, 2019
@lance6716 lance6716 added the difficulty/medium Medium task. label Oct 21, 2020
@csuzhangxc
Copy link
Member

We are integrating Lighting into TiDB, after we did it we can update DM to call this embedded Lightning via SQL statements.

@Little-Wallace
Copy link
Contributor

I'm add some interface for lightning and try to replace dm-loader with lightning.
See pr pingcap/tidb#27934

@lance6716
Copy link
Contributor

I'll transfer this issue to pingcap/tiflow

@lance6716 lance6716 transferred this issue from pingcap/dm Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium Medium task. TiDB-5.0 type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants