Commit Graph
267 Commits
Author SHA1 Message Date
Simon Désaulniers 7eb5d892f1 search: isDone computes using Request interface
There's no need to compute with time since the network engine gives us the
information we need.
2016-08-05 21:17:11 -04:00
Simon Désaulniers af8bfdc1c1 dht: fix sendListen loop bug
Each time a 'listen' request is sent to the network engine, we track this
request in the upper layer with a map<shared_ptr<Query>, shared_ptr<Request>>.
At some point, this map has to be maintained or totally cleared. However, it was
done wrong, hence the sendListen loop. Clearing a pair <Query, Request> has to
be done when the API user cancels a 'listen' operation.
2016-08-03 18:49:37 -04:00
Simon Désaulniers 88040ad467 dht: display debug info according to query impact 2016-08-03 18:49:10 -04:00
kaldoran df3317a5b2 dht: bootstrap from cache instead of routing table 2016-08-03 10:04:02 -04:00
Adrien Béraud b8e10bfe15 const shared_ptr 2016-07-29 21:37:07 -04:00
Nicolas 68707aff17 dht: prevent outdated store of value 2016-07-28 16:58:04 -04:00
Simon Désaulniers 62835bdc54 dht: make main store a vector<unique_ptr<Storage>>
Since the elements inside are going to be moved constantly during the life of
the node, this design is better. Also, it works around a crash when the store is
resized (elements inside moved) at some point (always happenned the 3rd time)
for some reason. This bug was known when compiled with LLVM >7.3.0 (>clang-703.0.31).
2016-07-22 16:57:46 -04:00
Simon Désaulniers 2f72563b1f dht: return consistent query from local storage
When querying from local storage with SELECT f, a FieldValueIndex with empty
fields was returned without considering the SELECT statement requiring only a
field "f".
2016-07-19 15:52:21 -04:00
Simon Désaulniers a4834efd37 dht: use queries in dht 2016-07-10 19:26:13 +02:00
Adrien Béraud b09e3df2e2 add network id to distinguish different networks 2016-06-21 03:06:47 -04:00
Adrien Béraud fdfa10bd2e dht: clear search before expiring it 2016-06-13 15:55:34 -04:00
Adrien Béraud c6b0e531c2 dht: add code documentation 2016-06-11 18:54:18 -04:00
Simon Désaulniers 54a4327039 dht: handle search expired before permanent put 2016-06-03 17:20:58 -04:00
Simon Désaulniers dcca94aab7 dht,api: enable optional permanent put on dht
A permanent put is going to be executed once and every time the data expires on
each SearchNode.
2016-06-03 17:20:58 -04:00
Simon Désaulniers 173a9ee642 revert attempt to avoid securedht cert put fail 2016-06-03 17:20:58 -04:00
Simon Désaulniers ed1ca6db8f Revert "dht: wait for connection before running searches"
This reverts commit bd08506146.
2016-06-03 17:20:58 -04:00
Adrien Béraud 7367158284 dht: new insertNode algorithm 2016-06-03 17:20:58 -04:00
Andreas Traczyk 9e461e0960 microsoft compiler support 2016-06-02 12:17:09 -04:00
Adrien Béraud bd08506146 dht: wait for connection before running searches 2016-05-27 15:39:48 -04:00
Adrien Béraud d44c59016e network_engine: remove onNewNode return value 2016-05-27 14:54:56 -04:00
Adrien Béraud 4d75f64576 log: rename ERROR to ERR to build on Windows 2016-05-27 12:30:32 -04:00
Adrien Béraud c70d5d7b97 dht: don't send nodes in storageChanged 2016-05-27 02:13:08 -04:00
Adrien Béraud d0cebaa002 dht: clear listen status in cancelListen 2016-05-27 01:56:13 -04:00
Adrien Béraud 172b1089fb dht: search log improvements 2016-05-24 03:44:18 -04:00
Adrien Béraud 6cdc242b6e node: add pendingMesageCount 2016-05-24 03:44:18 -04:00
Adrien Béraud 8da15ad450 dht: adapt search routine to network engine 2016-05-22 16:56:47 -04:00
Adrien Béraud 5f1b79e6de dht: minor refactoring/optimisations 2016-05-22 16:56:47 -04:00
Adrien Béraud 0e7dda680a header cleanup 2016-05-22 16:56:47 -04:00
Adrien Béraud 855b69710d dht: run searchStep imediatly on announce 2016-05-19 17:37:39 -04:00
Adrien Béraud d93657d6f9 dht: wait for both AF to call callback 2016-05-19 17:37:39 -04:00
Adrien Béraud 2b57c8109a dht: clear announces on expire 2016-05-19 17:29:19 -04:00
Adrien Béraud a032f50a27 dht: catch all network engine errors 2016-05-19 17:28:31 -04:00
Adrien Béraud 8ee0d83ad7 dht: log cleanup 2016-05-19 17:28:31 -04:00
Adrien Béraud f46043069d revert: dht: limit search nodes to SEARCH_NODES nodes 2016-05-19 01:55:18 -04:00
Adrien Béraud 9d7f6d287a dht: clear candidate on expire 2016-05-18 02:19:06 -04:00
Adrien Béraud 17d57ba04a dht: remove anoying log 2016-05-18 01:23:47 -04:00
Adrien Béraud 9ad21d5c5d dht: remove newSearch() 2016-05-18 01:23:18 -04:00
Adrien Béraud db6c301084 dht: don't count bad nodes in get request count 2016-05-15 01:28:09 -04:00
Adrien Béraud 9b14fc8bb8 dht: use method to count requests 2016-05-14 23:16:23 -04:00
Adrien Béraud f6b9340313 dht: avoid to discard storage with local listener 2016-05-14 23:16:23 -04:00
Adrien Béraud 79d90e480d dht: limit search nodes to SEARCH_NODES nodes 2016-05-14 15:48:34 -04:00
Adrien Béraud a926e273af dht: forward-declare more internal structures 2016-05-14 15:48:34 -04:00
Adrien Béraud e37307654f make sure securedht methods override dht's 2016-05-13 16:38:23 -04:00
Adrien Béraud ed8cdfd81a don't remove flying nodes from searches 2016-05-10 12:50:39 -04:00
Adrien Béraud 040e3770ad node: use requests to determinate state 2016-05-09 16:17:59 -04:00
Adrien Béraud ef1bf5ccec move node cache to message engine 2016-05-08 00:37:52 -04:00
Adrien Béraud 8cc53b1751 add node cache, split dhtrunner.h from dht.h 2016-05-08 00:37:52 -04:00
Adrien Béraud 92613f5fbf net: improve request state consistency 2016-05-03 18:33:38 -04:00
Adrien Béraud 733cf335d3 dht: limit concurrent search requests instead of steps intervals 2016-05-03 12:05:14 -04:00
Adrien Béraud 92df1f5a2b dht: recompute step time for existing searches 2016-05-02 18:42:14 -04:00