Changes between Initial Version and Version 1 of Ticket #648, comment 15


Ignore:
Timestamp:
2013-10-11T15:28:02Z (11 years ago)
Author:
zooko
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #648, comment 15

    initial v1  
    33 A very important indicator of the health of a server in a grid is whether it will take new shares. A client node has enough information (or could record it) to know this. It should show somehow if a node is not taking shares (either if it says it won't or if it actually doesn't). The lack of this feature makes it almost impossible to assess if files can be uploaded without trying it.
    44
    5 Whether a server is accepting shares is determined like this: if the server is configured to be in read-only mode then it sets its "available space" to 0: [source:trunk/src/allmydata/storage/server.py?annotate=blame&rev=4895#L189 StorageServer.get_available_space()]. If "reserved space" is set then it subtracts that much space from its available space: [source:trunk/src/allmydata/storage/server.py?annotate=blame&rev=4895#L71 StorageServer.__init__()]. It includes the resulting "available space" in the metadata about itself that it sends back in response to {{{get_version}}} requests: [source:trunk/src/allmydata/storage/server.py?annotate=blame&rev=4895#L203 StorageServer.remote_get_version()].
     5Whether a server is accepting shares is determined like this: if the server is configured to be in read-only mode then it sets its "available space" to 0: [source:trunk/src/allmydata/storage/server.py?annotate=blame&rev=33e2d2962e2bc6ccf0f8619d5ea67baee1aebde1#L196 StorageServer.get_available_space()]. If "reserved space" is set then it subtracts that much space from its available space: [source:trunk/src/allmydata/util/fileutil.py?annotate=blame&rev=ff64a0fef5879d3651bc3db6ca0522d96b217d45#L338 fileutil.get_disk_stats()]. It includes the resulting "available space" in the metadata about itself that it sends back in response to {{{get_version}}} requests: [source:trunk/src/allmydata/storage/server.py?annotate=blame&rev=33e2d2962e2bc6ccf0f8619d5ea67baee1aebde1#L221 StorageServer.remote_get_version()].
    66
    7 The client invokes {{{get_version}}} on each server as soon as it connects to that server, but it doesn't do so ever again as long as it stays connected: [source:trunk/src/allmydata/storage_client.py?annotate=blame&rev=5018#L232 storage_client.NativeStorageServer].
     7The client invokes {{{get_version}}} on each server as soon as it connects to that server, but it doesn't do so ever again as long as it stays connected: [source:trunk/src/allmydata/storage_client.py?annotate=blame&rev=68b7f9e979158dcb9f2fbc1bea74183c6897d46e#L161 storage_client.NativeStorageServer].
    88
    99So, this ticket is basically a superset of #1206. The client is already learning (once, at connection establishment time) how much space the server is offering, which is equal to 0 if and only if the server is either in read-only mode or is full. If the client would display this information to the user in a nice comprehensible way then both #1206 and this ticket would be fixed.
    1010
    11 {{{patch-needed}}}! :-)
     11{{{test-needed}}}! :-)