-
Notifications
You must be signed in to change notification settings - Fork 971
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
service/share, ipld: adds ability to retrieve shares by namespace ID #170
Conversation
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.
General comment: Pls base it on top of #167 and implement a method there.
Initial review will need a more in-depth in logic itself, but for now pls fix mentioned things
884b578
to
9f95c2a
Compare
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.
The main stopper here is that we download the data we are not interested in to check if we stopped loading shares in a row. We shouldn't merge such behavior.
Also, some things were fixed during the sync review in between.
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.
Approve!!!
One thing: pls create an issue about parallelization of GetSharesByNamespace
. The speed-up must be significant if we parallelized GetSharesByNamespace for each Row independently.
The tests if failing due to #173. To resolve this here we can either:
@renaynay, WDYT? |
@renaynay, rebase on master and tests will go green |
c108645
to
d287d6e
Compare
1.16 tests running for too long, ***, seems like TestSubscriber still hangs |
@renaynay, add pls context.WithTimeout(time.Second * 10) to TestSubscriber. This way we ensure that tests won't run longer than 10*seconds if it hangs. |
Rerun helped and we can merge this, though in master, rarely hanging still might be the case. |
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.
Extra dope 🚀
Left some minor comments and nits.
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.
No comments, other than agreeing with @liamsi's review
Conflicting with default branch @renaynay |
62271b1
to
cc42239
Compare
This reverts commit ee8d591.
cc42239
to
bd47aab
Compare
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.
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.
Awesome @renaynay 🚀
This PR implements the ability to retrieve shares by namespace ID via two helper methods in the
ipld
package as well as a broaderRetrieveShares
function inservice/share
package.One thing to note:
PutData
inipld/write.go
prepends the namespaceID twice, so in several tests, it's necessary to check the returnedShare[8:] against the expectedShare.TODO:
RetrieveShares