-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1382.markberger rewrite rebase.6 #416
1382.markberger rewrite rebase.6 #416
Conversation
4d2b11f
to
e5d6ff4
Compare
Except for the downloader issue, I'm ok with landing this now and figuring out the rest later. The weight of history is bearing down on this branch :). We should think about the timeout issue, and the how-many-servers-will-we-use issue, before a release, but I think we should land this first. |
@@ -63,6 +63,7 @@ def start_finding_servers(self): | |||
if not self._started: | |||
si = self.verifycap.storage_index | |||
servers = self._storage_broker.get_servers_for_psi(si) | |||
servers.sort(key=lambda s: s.get_serverid()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this change. It modifies the downloader behavior, causing it to search for shares in the wrong order (get_servers_for_psi()
returns the permuted list, but this .sort()
call throws away that permutation), which will be a significant number-of-round-trip performance impact when there are a lot of servers. Not sure how this snuck in, maybe some unit test wanted to compare the ordering of servers on both uploads and downloads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, removing it causes test_hung_server.HungServerDownloadTest.test_5_overdue_immediate
to fail consistently. I'll look into that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this should be removed; it was in the original mark berger branch and I don't know why/what it's supposed to accomplish...
Oh, also, |
I will look into the integration thing; I think I actually made a unit-test that does the same things anyway. And yes, it got added in this branch by me. |
p.s. do you want me to at least squash all my commits into one? i.e. everything after "Fix test test_lost_servers" by @david415? |
Yeah, squashing is probably a good idea. The unrulyness of this branch is beyond hope, but at least we can avoid making it worse with each new round of fixes :). |
f086d8d
to
be73cd7
Compare
This is Mark Berger's original commits, from ticket #1382
…ing_response Add comments 10 and 8 from the servers of happiness spec Fix bug in _filter_g3 for servers of happiness Remove usage of HappinessUpload class here we modifying the PeerSelector class. we make sure to correctly calculate the happiness value by ignoring keys who's value are None... Remove HappinessUpload and tests Replace helper servers_of_happiness we replace it's previous implementation with a new wrapper function that uses share_placement
unit-test for happiness calculation unused function put old servers_of_happiness() calculation back for now test for calculate_happiness remove some redundant functions
Fix happiness test var names Remove unused imports Get rid of trailing whitespace
refactor hypothesis to be 'pytest style' and add another one get rid of 'shares->set(1 thing)' in generate_mappings return Add a unittest hypothesis came up with fix tests since we return peers, not sets-of-1-peer add more debug add a unit-test that's like test_problem_layout_ticket_1128 fix bug add a note fix utest unit-test for bigger numbers re-insert markberger code for testing results of pairing with david
Comment out all debug print statements Add hypothesis tests for the old servers of happiness implementation Attempt to speed up meejah's servers of happiness WIP Fix test_calc_happy WIP
correctly calculate happiness guard with except fix tests, and happiness calculation remove debug fix placements to None happiness calc shouldn't have to filter None WIP fixing some tests etc
Remove old hypothesis tests Fix allmydata.test.cli.test_cli.Errors.test_get this was broken due to differing share placements whereas we need to allow this. Fix test_5_overdue_immutable This change makes the test not depend on the value of PYTHONHASHSEED. Revert "Fix test_5_overdue_immutable" This reverts commit 5f3696d. fix test to actually hang the first 5 *servers* sort keys for stable output use file-context-managers remove probably-unneeded assert (that fails sometimes) another non-deterministic test?
be73cd7
to
23d27c5
Compare
Codecov Report
@@ Coverage Diff @@
## master #416 +/- ##
==========================================
- Coverage 88.02% 87.98% -0.04%
==========================================
Files 146 147 +1
Lines 27578 27833 +255
Branches 3921 3977 +56
==========================================
+ Hits 24275 24489 +214
- Misses 2599 2627 +28
- Partials 704 717 +13
Continue to review full report at Codecov.
|
23d27c5
to
05f48c3
Compare
Ok, looks good! Landing momentarily. |
This is a followup to #402
...could be useful to look at the diff from 'there to here': meejah/tahoe-lafs@74362a4...meejah:4d2b11f