diff --git a/tooz/drivers/etcd.py b/tooz/drivers/etcd.py index 49b6301c..34181b0b 100644 --- a/tooz/drivers/etcd.py +++ b/tooz/drivers/etcd.py @@ -232,6 +232,15 @@ class EtcdDriver(coordination.CoordinationDriver): #: Class that will be used to encode lock names into a valid etcd url. lock_encoder_cls = utils.Base64LockEncoder + CHARACTERISTICS = ( + coordination.Characteristics.NON_TIMEOUT_BASED, + coordination.Characteristics.DISTRIBUTED_ACROSS_THREADS, + coordination.Characteristics.DISTRIBUTED_ACROSS_PROCESSES, + # https://etcd.io/docs/v3.5/learning/api_guarantees/ + coordination.Characteristics.LINEARIZABLE, + coordination.Characteristics.SERIALIZABLE, + ) + def __init__(self, member_id, parsed_url, options): super(EtcdDriver, self).__init__(member_id, parsed_url, options) host = parsed_url.hostname or self.DEFAULT_HOST diff --git a/tooz/drivers/etcd3gw.py b/tooz/drivers/etcd3gw.py index 420db814..da6fbb17 100644 --- a/tooz/drivers/etcd3gw.py +++ b/tooz/drivers/etcd3gw.py @@ -204,6 +204,15 @@ class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, GROUP_PREFIX = b"tooz/groups/" + CHARACTERISTICS = ( + coordination.Characteristics.NON_TIMEOUT_BASED, + coordination.Characteristics.DISTRIBUTED_ACROSS_THREADS, + coordination.Characteristics.DISTRIBUTED_ACROSS_PROCESSES, + # https://etcd.io/docs/v3.5/learning/api_guarantees/ + coordination.Characteristics.LINEARIZABLE, + coordination.Characteristics.SERIALIZABLE, + ) + def __init__(self, member_id, parsed_url, options): super(Etcd3Driver, self).__init__(member_id, parsed_url, options) protocol = 'https' if parsed_url.scheme.endswith('https') else 'http'