-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
This PR refactors the stop logic to perform stop actions in parallel for various components (where it is safe to do so). This means that libp2p gets stopped at the same time as the republisher. When libp2p stops it closes all connections meaning that the republsher is able to complete a running republish sooner. Before, we had to wait for republish to complete before stop happens (since there's no way to cancel a DHT put right now). License: MIT Signed-off-by: Alan Shaw <[email protected]>
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.
This looks good, just a note, this will not be a graceful shutdown of the republisher since all libp2p connections will be closed. Any in progress dht connections will also be ended and errored. Since the node is shutting down, this feels reasonable, especially since we have no mechanism to gracefully stop the dht currently.
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.
LGTM!
Should you change the commit message to fix: stop ipns republisher asap
though? When I read the PR title I was not understanding the goal of the PR.
wow, did not expect this PR to cause this: 1) interface-ipfs-core over ipfs-http-client tests
.key.list
"after all" hook:
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\travis\build\ipfs\js-ipfs\test\node.js) |
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
This PR refactors the stop logic to perform stop actions in parallel for various components (where it is safe to do so). This means that libp2p gets stopped at the same time as the republisher. When libp2p stops it closes all connections meaning that the republsher is able to complete a running republish sooner.
Before, we had to wait for republish to complete before stop happens (since there's no way to cancel a DHT put right now).