Class LeaderAction

java.lang.Object
io.debezium.connector.spanner.task.leader.LeaderAction

public class LeaderAction extends Object
This class contains all the logic for the leader task functionality. Upon startup, the leader first checks if the sync topic is empty. If so, it assumes the connector is operating from a fresh start and sends an initial change stream query to receive back a list of initial change stream tokens. Then, it waits for all survived tasks to send a list of REBALANCE_ANSWER messages. Then, it rebalances change stream partitions from obsolete to new (survived) tasks. Finally, it generates a new epoch message with the new assignment of partitions and writes it into the sync topic.