Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

refactor: implement failover based distributed etcd lock #146

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

ZuLiangWang
Copy link
Contributor

@ZuLiangWang ZuLiangWang commented Mar 22, 2023

Which issue does this PR close?

(#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 apache/horaedb#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.

Are there any user-facing changes?

None.

How does this change test

Pass all unit tests and integration tests.

server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
server/coordinator/watch/watch.go Outdated Show resolved Hide resolved
@ShiKaiWi ShiKaiWi merged commit e7a4e46 into apache:refactor_cluster Mar 30, 2023
ZuLiangWang added a commit to ZuLiangWang/ceresmeta that referenced this pull request Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants