Simplify Vitess connector dependency

35 views
Skip to first unread message

Yang Wu

unread,
Nov 17, 2021, 2:12:55 AM11/17/21
to debezium
Hi, 

I'm looking at the Vitess connector and we are depending on vtctld. Looking through the code, the only place where we need it is to get a starting gtid for a new shard here. The semantic here is basically: "providing the latest gtid with best effort".

However, we can achieve the same thing by passing in "current" as the starting position, Vitess internally will translate that into the latest current position
> When a stream is created, gtid can either be “current” or a valid binlog position at which the vstream starts streaming events.

I believe this could remove vtctld from vitess connector's dependency and simplify the overall architecture, but would like to hear the feedback in case I'm missing something here.

Thanks,
Yang

Kewei Shang

unread,
Nov 18, 2021, 1:09:16 AM11/18/21
to debezium
Hi Yang,

You're right. AFAIK, the only purpose for the vtctld dependency is getting a starting GTID for a new shard. It should be safe to remove it and replace the logic by passing in `current` as the starting position.

Cheers,
Kewei

Reply all
Reply to author
Forward
0 new messages