Commit Graph
328 Commits
Author SHA1 Message Date
Adrien Béraud 4ef5a2216e dht: revert to previous onNewNode behavior 2016-10-19 01:27:19 -04:00
Simon Désaulniers 09e41cc9f2 dht: appropriate time info in permanent put ops 2016-10-18 14:20:43 -04:00
Adrien Béraud 71ad92e286 dht: log cleanup 2016-10-17 17:55:22 -04:00
Adrien Béraud d4f3d3aa98 dht: add missing iterator 2016-10-17 17:14:30 -04:00
Simon Désaulniers c0612a1b2c dht: use "refresh" operation for permanent put 2016-10-17 11:56:54 -04:00
Simon Désaulniers 6743cbbf50 dht: introduce "refresh" operation
This operation requests a node to refresh a value's time_point information of
its lifetime begining. This is intended to fix the *permanent put* operation
which has been having syncing issues since the introduction of an enhanced and
lighter put operation.
2016-10-17 11:56:54 -04:00
Adrien Béraud da1bdf9d4c dht: retry nodes more aggressively in case of failure 2016-10-16 22:36:52 -04:00
Adrien Béraud 96da4cd85d build: make logs optional at build time 2016-10-16 22:36:42 -04:00
Adrien Béraud cfb817d37f dht: add buckets() utility 2016-10-16 22:36:30 -04:00
Adrien Béraud 9440c03048 dht: log cleanup 2016-10-16 22:36:24 -04:00
Adrien Béraud 7af856508e dht: make connectivityChanged family dependent 2016-10-15 19:13:15 -04:00
Adrien Béraud aaed64039a dht: fix compilation on clang 2016-10-12 15:02:02 -04:00
Adrien Béraud 013b1dfe2e Merge pull request #138 from sim590/connectivity-changes-detect
search: detect connectivity changes
2016-10-11 16:01:59 -04:00
Simon Désaulniers 733f699ff2 search: detect connectivity changes
The number of bad nodes is limited in order to help determine presence of
connectivity changes. See https://github.com/savoirfairelinux/opendht/issues/137
for details.

According to the tables, 25 is a good average value for big networks. If the
network is small, normal search expiration process will handle the situation.
2016-10-11 15:54:37 -04:00
Adrien Béraud eed8ffc792 Merge pull request #139 from savoirfairelinux/recover-from-network-changes
dhtrunner: recover from network changes
2016-10-11 11:57:31 -04:00
Adrien Béraud 64118404fe dhtrunner: recover from network changes
Using a list of bootstrap nodes, we recover from network loss by pinging those
nodes continuously until connected.
Written with Simon Désaulniers.
2016-10-10 01:51:26 -04:00
Simon Désaulniers bb74dc846c dht/dhtrunner: enable callback for pingNode 2016-10-10 00:23:53 -04:00
Adrien Béraud 659d893dee network: transmit large values in multiple packets 2016-10-09 16:22:33 -04:00
Adrien Béraud f53c7a6785 dht: keep track of storage usage in maintainStorage 2016-10-04 03:09:00 -04:00
Simon Désaulniers dc0b650aa3 dht: make sure we are synced before sending put 2016-09-23 19:27:59 -04:00
Simon Désaulniers 87cf6faedd dht/node: don't allow more than 3 auth errors 2016-09-23 19:27:59 -04:00
Simon Désaulniers ca6aa6706d dht/value: make 'find_node' queries satisfied by any queries
'find_node' requests don't ask for values. Then, the idea of a Query makes less
sense, but since we still need those to map status to network engine requests,
we introduce dummy queries which with the field Query::none. Those queries will
then only serve as key to network engine's requests.
2016-09-23 19:27:58 -04:00
Simon Désaulniers 16e55416a6 network_engine: fix bug token not sent for listen 2016-09-23 19:27:58 -04:00
Simon Désaulniers 3e24058175 dht: fix SearchNode's getListenTime computation
When no listen request have been sent yet, getListenTime should tell it's okay
to send pending listen request.
2016-09-23 19:27:55 -04:00
Simon Désaulniers d1c2b20b28 dht: canGet must allow sending when no token 2016-09-23 13:48:04 -04:00
Adrien Béraud 23bb6e7a45 dht: use a map for storage 2016-09-16 01:29:33 -04:00
Adrien Béraud 6d38c18572 introduce SockAddr to store IP addresses 2016-09-15 01:38:26 -04:00
Simon Désaulniers 6f7ac21a85 dht: refactor code, terminating a Search (isDone)
More code encapsulated in objects method is better for keeping consistent
behavior.
2016-09-14 18:06:25 -04:00
Simon Désaulniers 7c5db84f33 dht: take multiple queries into account
The code preceding this would just not take multiple concurrent queries for a
same search into account. This is a bug fix for a bad behavior since the
queries.
2016-09-14 18:06:23 -04:00
Simon Désaulniers 4fecb2066b dht: SearchNode::canGet criteria using 'update'
The criteria has been rewritten (again) exploiting the idea behind the parameter
'update' to take into account the case where we have new distinct requests to
send, then bypass some checks.
2016-09-14 18:06:12 -04:00
Adrien Béraud eabdddcfb3 dht: fix warnings 2016-09-08 18:02:17 -04:00
Adrien Béraud a9cc669a95 dht: clarify code 2016-09-08 15:52:18 -04:00
Simon Désaulniers 927c835b8f dht: call all announce callback appropriately 2016-09-08 12:24:35 -04:00
Simon Désaulniers 5415eaaf60 dht: consider probe query in announce time 2016-09-08 12:24:35 -04:00
Simon Désaulniers ec587f9b58 dht: make sure search can be flagged "done" 2016-09-08 12:24:35 -04:00
Simon Désaulniers babfed73f3 dht: use SearchNode::acked for next announce time 2016-09-08 12:24:35 -04:00
Simon Désaulniers 2c0ce576e3 dht: enable data persistence 2016-09-08 12:24:35 -04:00
Simon Désaulniers 8f2cc937c5 dht: introduce light put
The 'put' operation will now first check if nodes already store the value we
have to announce. If so, we don't announce it to that node.
2016-09-08 12:24:35 -04:00
Simon Désaulniers d60672e8ba dht: remove unnecessary return value 2016-09-07 16:15:06 -04:00
Adrien Béraud 7919ca8de1 dht: fail pending operations before clearing them 2016-09-02 14:30:08 -04:00
Adrien Béraud 00ef660952 dht: hide more internal structures 2016-09-02 14:30:08 -04:00
kaldoran 2a3c301314 dht: Fix get and put at the same time on a same node
When the put is performed just after a get, then the get will not include the value which was in the put.
2016-09-01 18:02:23 -04:00
kaldoran ae26a2b39a Update of algorithm, by using new feature of api 2016-09-01 18:02:23 -04:00
Adrien Béraud d1d0a67d35 dht: fix public address sorting 2016-09-01 12:46:39 -04:00
Simon Désaulniers 73686debaf dht: before sending 'listen', send find_node
Since pagination, a bug was making the listen feature unusable running in
infinite loop. This also makes more sense than sending 'get' since the listen
request is paired with a Query defining the values that have to be fetched.
2016-08-30 15:51:50 -04:00
Adrien Béraud b3401828e4 dht: set "connecting" state when waiting for a ping 2016-08-25 00:42:50 -04:00
Simon Désaulniers 8d7deffa6a dht: properly find pending satisfying query
In SearchNode::canGet, we don't send a 'get' request to a search node if a
satisfying query for the query we want to send is already pending. This patch
honors this behavior.
2016-08-22 18:45:29 -04:00
Simon Désaulniers 669c08210e dht: erase find node request status when done
This was memory leak and produced inconsistency in SearchNode::canGet timings.
2016-08-22 18:26:53 -04:00
Adrien Béraud 690682408b build with -pedantic-errors, fix pedantic build errors 2016-08-16 10:26:44 -04:00
Simon Désaulniers e9bf042ac5 dht: document SearchNode::canGet 2016-08-15 13:44:52 -04:00