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 publish fails in offline mode #1593
Comments
Makes sense there's a usecase for fast return. but default action should be able to wait until name is resolvable (readable) by others. standard semantics writer. there may also be an error or failure to publish. Waiting is the safe bet from a UX-correctness standpoint. i think also, the waiting time may be related to an odd waiting time i've been seeing recently. it happens on |
|
Although, |
|
If the default should be to wait for resolvable, what is the intended behaviour in offline or small (say three node) networks? I'm not sure that waiting belongs in this command at all. |
|
I dont think the ipfs add stuff and the publish issue are related. unless the provides code in bitswap changed recently to block on The waiting in publish is rather strange though, when offline we should see that we have no peers to send to and return |
|
@krl could you provide a repro? running: returns immediately with: Running it with an object that doesnt exist locally returns: Immediately. |
|
|
It seems like it returns immediately if daemon is not running, otherwise it blocks for several seconds. |
|
@krl if the daemon is running, then the 'delay' is publishing to the dht. perfectly normal. Good to close? |
|
@whyrusleeping no, the point is that @krl wants to be able to return immediately, which is a valid UX use case. and, publish is slow for me, always. (>5s) I think we should add |
|
Yep, and for my usecase it would also be enough that the command updates the internal ipns entry first, before publishing. |
|
@krl what is your usecase? perhaps you would want to use ipns through the mfs api? it does what you want with the 'returning as soon as the internal ref is updated' |
|
related: #3114 |
krl commentedAug 20, 2015
At the moment, the ipfs name publish assumes that you are online, and also takes several seconds to return. I think a better approach would be to return immediately, and begin broadcasting the new name as soon as you have peers.
Making apps wait 5 seconds for publishing a name also creates some unnecessary UI problems.
@whyrusleeping @jbenet
The text was updated successfully, but these errors were encountered: