mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-19 07:48:11 +00:00
storage: make storage servers declare oldest supported version == 1.0, and storage clients declare oldest supported version == 1.0
See comments in patch for intended semantics.
This commit is contained in:
@ -46,8 +46,9 @@ class Client(node.Node, testutil.PollMixin):
|
|||||||
NODETYPE = "client"
|
NODETYPE = "client"
|
||||||
SUICIDE_PREVENTION_HOTLINE_FILE = "suicide_prevention_hotline"
|
SUICIDE_PREVENTION_HOTLINE_FILE = "suicide_prevention_hotline"
|
||||||
|
|
||||||
# we're pretty narrow-minded right now
|
# This means that if a storage server treats me as though I were a
|
||||||
OLDEST_SUPPORTED_VERSION = allmydata.__version__
|
# 1.0.0 storage client, it will work as they expect.
|
||||||
|
OLDEST_SUPPORTED_VERSION = "1.0.0"
|
||||||
|
|
||||||
# this is a tuple of (needed, desired, total, max_segment_size). 'needed'
|
# this is a tuple of (needed, desired, total, max_segment_size). 'needed'
|
||||||
# is the number of shares required to reconstruct a file. 'desired' means
|
# is the number of shares required to reconstruct a file. 'desired' means
|
||||||
|
@ -74,14 +74,17 @@ class RIStorageServer(RemoteInterface):
|
|||||||
__remote_name__ = "RIStorageServer.tahoe.allmydata.com"
|
__remote_name__ = "RIStorageServer.tahoe.allmydata.com"
|
||||||
|
|
||||||
def get_versions():
|
def get_versions():
|
||||||
"""Return a tuple of (my_version, oldest_supported) strings.
|
"""
|
||||||
Each string can be parsed by an allmydata.util.version.Version
|
Return a tuple of (my_version, oldest_supported) strings. Each string can be parsed by
|
||||||
instance, and then compared. The first goal is to make sure that
|
a pyutil.version_class.Version instance or a distutils.version.LooseVersion instance,
|
||||||
nodes are not confused by speaking to an incompatible peer. The
|
and then compared. The first goal is to make sure that nodes are not confused by
|
||||||
second goal is to enable the development of backwards-compatibility
|
speaking to an incompatible peer. The second goal is to enable the development of
|
||||||
code.
|
backwards-compatibility code.
|
||||||
|
|
||||||
This method is likely to change in incompatible ways until we get the
|
The meaning of the oldest_supported element is that if you treat this storage server as
|
||||||
|
though it were of that version, then you will not be disappointed.
|
||||||
|
|
||||||
|
The precise meaning of this method might change in incompatible ways until we get the
|
||||||
whole compatibility scheme nailed down.
|
whole compatibility scheme nailed down.
|
||||||
"""
|
"""
|
||||||
return TupleOf(str, str)
|
return TupleOf(str, str)
|
||||||
|
@ -759,7 +759,9 @@ class StorageServer(service.MultiService, Referenceable):
|
|||||||
implements(RIStorageServer, IStatsProducer)
|
implements(RIStorageServer, IStatsProducer)
|
||||||
name = 'storage'
|
name = 'storage'
|
||||||
|
|
||||||
OLDEST_SUPPORTED_VERSION = LooseVersion("0.8.0")
|
# This means that if a client treats me as though I were a 1.0.0 storage server, they will
|
||||||
|
# not be disappointed.
|
||||||
|
OLDEST_SUPPORTED_VERSION = LooseVersion("1.0.0")
|
||||||
|
|
||||||
def __init__(self, storedir, sizelimit=None,
|
def __init__(self, storedir, sizelimit=None,
|
||||||
discard_storage=False, readonly_storage=False,
|
discard_storage=False, readonly_storage=False,
|
||||||
|
Reference in New Issue
Block a user