You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/14 12:13:39 UTC
[GitHub] [dolphinscheduler] wjf222 commented on issue #8975: [Feature][Registry] Support etcd as registry
wjf222 commented on issue #8975:
URL: https://github.com/apache/dolphinscheduler/issues/8975#issuecomment-1184374012
## Design
### CRUD
Etcd is a distributed key-value storage system which support CRUD originally.
For some temp keys which need to be deleted on discoonect. we can grant leases for keys from etcd cluster.When a key is attached to a lease, its lifetime is bound to the lease's lifetime which in turn is governed by a time-to-live(TTL).Once a lease's TTL elapses, the lease expires and all attached keys are deleted.Applications can keep a lease alive by refreshing its TTL so it does not expire. By lease and keepalive, we can make sure the key will exist when the client disconnect, the lease will delete.
### Subscribe/Notify
There is a watchClient in etcd to monitor changes to keys. When a watch response coming,the listener will notify.
### Lock
Etcd Lock uses a lease on a key which is revoked when the lock is reased.If the server the lock is running on dies, or the network is disconnected, etcd will time out the lock.
### ConnectionStateListener
We get Client's shared channel by reflect, becase all fields is private on jetcd.
There will be a scheduler thread, if the channel state has changed, then is will trigger the connection listener.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org