[tahoe-lafs-trac-stream] [tahoe-lafs] #1363: refactor storage_client.py, use IServer objects instead of rrefs
tahoe-lafs
trac at tahoe-lafs.org
Mon Aug 1 13:27:46 PDT 2011
#1363: refactor storage_client.py, use IServer objects instead of rrefs
------------------------+---------------------------
Reporter: warner | Owner: warner
Type: task | Status: new
Priority: major | Milestone: 1.9.0
Component: code | Version: 1.8.2
Resolution: | Keywords: review-needed
Launchpad Bug: |
------------------------+---------------------------
Comment (by warner):
Your modified patches in
attachment:remove_get_serverid_from_DownloadStatus
.add_request_sent_and_add_block_request-rebased.darcs.patch
look fine, except for two hunks in the second patch that have a typo
(possibly one that I introduced in one patch and then fixed in a
subsequent one).
{{{
hunk ./src/allmydata/test/test_web.py 88
- serverid_a = hashutil.tagged_hash("foo", "serverid_a")[:20]
- serverid_b = hashutil.tagged_hash("foo", "serverid_b")[:20]
+ serverA = FakeIServer(hashutil.tagged_hash("foo", "serverid_a")[:20])
+ serverB = FakeIServer(hashutil.tagged_hash("foo", "serverid_a")[:20])
}}}
that last line needs to use serverid_b, not serverid_a.
{{{
hunk ./src/allmydata/test/test_web.py 117
- e = ds.add_block_request(serverid_a, 1, 120, 30, now+1) # left
unfinished
+ e = ds.add_block_request(serverB, 1, 120, 30, now+1) # left
unfinished
}}}
same issue, it needs to be "serverA".
As for changing {{{make_write_bucket_proxy()}}} to take an {{{IServer}}}
instead of a {{{(rref, IServer)}}} pair: nope, the rref passed into
{{{make_write_bucket_proxy()}}} is an {{{RIBucketWriter}}} (bound to a
specific share), whereas {{{IServer.get_rref()}}} returns the server's
{{{RIStorageServer}}} (on which you use {{{allocate_buckets()}}} to get
an {{{RIBucketWriter}}}). I suppose it'd have been more obvious if the
parameter name was "bucket_rref" instead of just "rref".
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1363#comment:35>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list