-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Ipns name resolution #45
Conversation
@@ -58,6 +60,7 @@ func ipfsCmd(c *commander.Command, args []string) error { | |||
|
|||
func main() { | |||
u.Debug = true | |||
runtime.GOMAXPROCS(2) |
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.
curious why limiting concurrency?
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 beleive it actually defaults to one, i was bumping it to two just for my own sanity. (let me know if im wrong)
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.
num := runtime.NumCPU()
runtime.GOMAXPROCS(num)
Re: GOMAXPROCS
This call will go away when the scheduler improves.
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.
Yeah, and setting GOMAXPROCS to your number of CPU's is rarely a good idea (if you dont beleive me, go on #go-nuts and ask, lol). We should first determine a way to measure performance, and see how it changes across different numbers of procs.
|
||
var ErrCouldntResolve = errors.New("could not resolve name.") | ||
|
||
type MasterResolver struct { |
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.
may want to make this struct private to prevent it from being instantiated without its handlers being initialized
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.
Good point.
609a71b
to
5fafaa4
Compare
@whyrusleeping want to rebase on top of new master and then merge it in? What else is left? |
At this point it works. (as far as individual name resolution goes) I still need to test it in the grande scheme of things (i.e. requesting /ipns/jero.my or /ipns/base58hash) |
@whyrusleeping I'm going to:
|
Btw: i noticed that you're merging sometimes when we're both working on same branch. pro-tip: rebase pull. # rebase pull
git pull --rebase
# setup branch to always rebase
git config branch.master.rebase true
# setup all future branches to rebase
git config branch.autosetuprebase always
git config --global branch.autosetuprebase always http://gitready.com/advanced/2009/02/11/pull-with-rebase.html |
- cleaned up cmd help - ipfs name publish [<name>] <ref> - ipfs name resolve [<name>] - publish validates <ref> - both validate n args
Conflicts: cmd/ipfs/ipfs.go
|
make it easier to detect an uninitialized repo
make it easier to detect an uninitialized repo
make it easier to detect an uninitialized repo
make it easier to detect an uninitialized repo
fix: slightly reduce memory usage when walking large directory trees
This branch is not yet complete, but before i move forward, the name resolution code (in namesys) needs some critiquing. There are also a decent number of bugfixes in this branch that i ran into while trying to get the code to a point where i could test ipns.