pingcap / tidb-binlog

A tool used to collect and merge tidb's binlog for real-time data backup and synchronization.
Apache License 2.0
292 stars 131 forks source link

Drainer: support plugin to support cyclic replication etc. #886

Open tsthght opened 4 years ago

tsthght commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe:

So far, DM and Drainer can not support cyclic replication.

Describe the feature you'd like:

Drainer support cyclic replication.

Describe alternatives you've considered:

By adding plugin module, Drainer will gain the ability to support cyclic replication. Meanwhile, increases the expansibility of Drainer.

Teachability, Documentation, Adoption, Migration Strategy:

WangXiangUSTC commented 4 years ago

thanks, It's is a good idea to support some function by plugin, we will take a look

tsthght commented 4 years ago

Summary Add plugin framework to Drainer, so that increases Drainer's expansibility

Motivation We have the requirement for circular replication between TiDB and other Databases. In order to compatible different databases, we need abstract the business logic. In addition, in the feature we may als customize some other functions, such as filter, data consistency verification and so on. Plugin framework can meet all above requirements.

Design We can Add plugin framework to Drainer and add some Hook at different locations. Users can customize plugin to implement different Hook,so that meet their business requirement.

WangXiangUSTC commented 4 years ago

pr https://github.com/pingcap/tidb-binlog/pull/977 is doing this