borismartinovic01 opened a new pull request, #240: URL: https://github.com/apache/kvrocks-controller/pull/240
This PR introduces `Consul` as a store engine and tries to align the implementation with the implementations of `etcd` and `zookeeper` as much as possible. ### Constants description: 1. `sessionTTL = 10 seconds` - Minimum required by Consul 2. `lockDelay = 1 millisecond` - Consul defines a default lock delay of 15 seconds. In the docs it is mentioned that this can be disabled by setting this param to zero value but looking at the source code of Consul's session.go implementation this is not possible, so it is set to the minimum that's bigger than zero value 3. `defaultElectPath = "kvrocks/controller/leader"` - Removed the backslash from the beginning since Consul requires keys not to start with a backslash. ### Testing 1. Tested the implementation by running Consul as Docker container locally and running UTs Tests were kept almost the same as for etcd and zookeeper except the backslash was removed from keys due to limitation mentioned above and wait duration was increased from 15 to 25 seconds in the second test since the sessionTTL is a bit bigger. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
