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?
Add shard watcher to get notify when shard lock is expired.
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 basedetcd
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.