apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.
https://horaedb.apache.org
Apache License 2.0
27 stars 15 forks source link

refactor: implement failover based distributed etcd lock #146

Closed ZuLiangWang closed 1 year ago

ZuLiangWang commented 1 year ago

Which issue does this PR close?

(https://github.com/CeresDB/ceresmeta/issues/145)

Rationale for this change

In order to ensure that user data in distributed mode will not be lost, we need a mechanism to ensure that CeresDB will not have multiple leader shard under any circumstances. etcd lock has been added in https://github.com/CeresDB/ceresdb/pull/706 , we refactor scheduler to implement failover based etcd distributed lock.

What changes are included in this PR?

Are there any user-facing changes?

None.

How does this change test

Pass all unit tests and integration tests.