Skip to content
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

Merged
merged 11 commits into from
Jun 5, 2017

Conversation

meejah
Copy link
Contributor

@meejah meejah commented Apr 25, 2017

This is a followup to #402

...could be useful to look at the diff from 'there to here': meejah/tahoe-lafs@74362a4...meejah:4d2b11f

@meejah meejah force-pushed the 1382.markberger-rewrite-rebase.6 branch from 4d2b11f to e5d6ff4 Compare April 25, 2017 22:12
@warner
Copy link
Member

warner commented Jun 5, 2017

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())
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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...

@warner
Copy link
Member

warner commented Jun 5, 2017

Oh, also, integration/test_servers_of_happiness.py is failing (on travis), I think it's a new test that got added in this branch?

@meejah
Copy link
Contributor Author

meejah commented Jun 5, 2017

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.

@meejah
Copy link
Contributor Author

meejah commented Jun 5, 2017

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?

@warner
Copy link
Member

warner commented Jun 5, 2017

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 :).

@meejah meejah force-pushed the 1382.markberger-rewrite-rebase.6 branch 2 times, most recently from f086d8d to be73cd7 Compare June 5, 2017 21:57
markberger and others added 10 commits June 5, 2017 16:26
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?
@meejah meejah force-pushed the 1382.markberger-rewrite-rebase.6 branch from be73cd7 to 23d27c5 Compare June 5, 2017 22:26
@codecov-io
Copy link

codecov-io commented Jun 5, 2017

Codecov Report

Merging #416 into master will decrease coverage by 0.03%.
The diff coverage is 96.8%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/allmydata/control.py 68.44% <ø> (ø) ⬆️
src/allmydata/nodemaker.py 100% <ø> (ø) ⬆️
src/allmydata/immutable/repairer.py 100% <ø> (ø) ⬆️
src/allmydata/dirnode.py 98.26% <ø> (ø) ⬆️
src/allmydata/immutable/checker.py 87.94% <ø> (ø) ⬆️
src/allmydata/immutable/downloader/share.py 92.82% <ø> (-4.49%) ⬇️
src/allmydata/util/happinessutil.py 100% <100%> (ø) ⬆️
src/allmydata/client.py 86.95% <100%> (ø) ⬆️
src/allmydata/interfaces.py 98.84% <100%> (+0.01%) ⬆️
src/allmydata/util/deferredutil.py 70.73% <100%> (+4.69%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42d8a79...05f48c3. Read the comment docs.

Squashed all commits that were meejah's between
30d68fb
and
33c268e
On the branch meejah:1382.markberger-rewrite-rebase.6 as
per review
@meejah meejah force-pushed the 1382.markberger-rewrite-rebase.6 branch from 23d27c5 to 05f48c3 Compare June 5, 2017 22:31
@warner
Copy link
Member

warner commented Jun 5, 2017

Ok, looks good! Landing momentarily.

@warner warner merged commit 05f48c3 into tahoe-lafs:master Jun 5, 2017
@meejah meejah deleted the 1382.markberger-rewrite-rebase.6 branch March 20, 2018 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants