Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

chore: disable dht discovery #1907

Merged
merged 1 commit into from
Mar 5, 2019
Merged

Conversation

vasco-santos
Copy link
Member

Currently js-ipfs was having a bad time with CPU usage.

In this context, we decided to go with a temporary change on dht.put, as well as disabling the random-walk discovery. We will benefit from discovery through the queries that we will be running for now.

With this, we will get js-ipfs stable again, as well as have the DHT available and have time to implement a proper solution to solve this issue.

More details about the problem and discussion of the solution:

@ghost ghost assigned vasco-santos Mar 4, 2019
@ghost ghost added the status/in-progress In progress label Mar 4, 2019
@vasco-santos
Copy link
Member Author

I did not add tests for the randomWalk disabled, as js-libp2p / js-libp2p-kad-dht already do that.

@@ -79,7 +79,7 @@ function defaultBundle ({ datastore, peerInfo, peerBook, options, config }) {
kBucketSize: get(options, 'dht.kBucketSize', 20),
enabled: get(options, 'offline', false) ? false : undefined, // disable if offline
randomWalk: {
enabled: get(options, 'dht.randomWalk.enabled', true)
enabled: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you add a comment explaining the reason for this being disabled?

@vasco-santos
Copy link
Member Author

Thanks for pointing out Alan. Added the issue in a comment

@alanshaw alanshaw merged commit 3fff46a into master Mar 5, 2019
@alanshaw alanshaw deleted the chore/disable-dht-discovery branch March 5, 2019 17:01
@ghost ghost removed the status/in-progress In progress label Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants