tidis icon indicating copy to clipboard operation
tidis copied to clipboard

What is the use of this checkLeader?

Open John520 opened this issue 4 years ago • 2 comments

https://github.com/yongman/tidis/blob/8da5613fe14cd93d4d16ccd8d522747c943c969c/tidis/leader.go#L32 I am confuse in this code.why does tidis need to checkLeader? if checkLeader fail ,it also does not do something. Isn't Tidis stateless?

John520 avatar Jun 24 '21 03:06 John520

Tidis is stateless indeed, but tidis need do something like requesting TIKV do GC which only execute in one instance.

yongman avatar Jun 24 '21 04:06 yongman

thanks, I understand.BTW in this document GC Overview,i found Starting with TiDB 5.0, the Do GC step will always use the DISTRIBUTED gc mode. This replaces the earlier CENTRAL gc mode, which was implemented by TiDB servers sending GC requests to each Region. will Tidis change gc mode to DISTRIBUTED gc mode?

John520 avatar Jun 24 '21 08:06 John520

Please refer to https://github.com/tidb-incubator/tidis

yongman avatar Sep 20 '22 05:09 yongman