Commit Graph

434 Commits

Author SHA1 Message Date
Raúl Kripalani
b9ac6b77b1 gx-go rw. 2018-08-30 15:26:03 +01:00
Raúl Kripalani
5d7633f0c9 move in-memory peerstore into mem package. 2018-08-30 15:26:03 +01:00
Raúl Kripalani
eaa2ccbf1e refactor tests into suites.
This enables each implementation to subject itself to a common test
suite.
2018-08-30 13:44:50 +01:00
Raúl Kripalani
aeae977598 refactor peerstore (+)
1. Create interface.go with abstract interfaces.
2. Extract memory-based keybook into file.
3. Spin off PeerMetadata interface.
2018-08-29 16:23:04 +01:00
Cole Brown
b1e626f38d gx publish 1.5.0 2018-08-27 19:06:57 -04:00
bigs
bb3d4c617a
Merge pull request #29 from libp2p/feat/persist_peerstore
Persist peerstore via Datastore
2018-08-27 18:41:54 -04:00
Cole Brown
f758b41fc4 Add lru cache dependency 2018-08-27 18:30:20 -04:00
Cole Brown
c2e901d580 Add datastore dependencies 2018-08-27 18:25:52 -04:00
Cole Brown
34b7dc806d Implement proper benchmark with b.N 2018-08-27 18:20:29 -04:00
Cole Brown
f3e62000ee Use b.N in benchmarks 2018-08-27 18:20:29 -04:00
Cole Brown
996387510d Run benchmarks 10s, report rates 2018-08-27 18:20:29 -04:00
Cole Brown
1d5ab0b868 Update benchmark timings to stress peerstores more 2018-08-27 18:20:29 -04:00
Cole Brown
6a9cba0e1b Update benchmarks to run against both peerstores 2018-08-27 18:20:29 -04:00
Cole Brown
4972b40efd Add ARCCache to DatastoreAddrManager 2018-08-27 18:20:29 -04:00
Cole Brown
c0ff7b9b66 Acquire full lock when ticking ttlmanager 2018-08-27 18:20:29 -04:00
Cole Brown
f367209272 Handle batch Delete error 2018-08-27 18:20:29 -04:00
Cole Brown
f31d7e51ff Use nil instead of empty Multiaddr 2018-08-27 18:20:29 -04:00
Cole Brown
e7dca4205e Fix logic for AddAddrs 2018-08-27 18:20:29 -04:00
Cole Brown
9eeea343d5 Update ttlmanager to use ds.Batching 2018-08-27 18:20:29 -04:00
Cole Brown
78cd2c5abd Implement error retry logic for transactions 2018-08-27 18:20:29 -04:00
Cole Brown
b550e5b2c6 Mutex hat pattern 2018-08-27 18:20:29 -04:00
Cole Brown
7e3363eeb4 Remove redundant channel from ttlmanager 2018-08-27 18:20:29 -04:00
Cole Brown
785b890ecb Only lock critical section 2018-08-27 18:20:29 -04:00
Cole Brown
be8ee63ab9 Remove pure badger impl of AddrBook 2018-08-27 18:20:29 -04:00
Cole Brown
fe121a4c3e Clarify comment for tick function 2018-08-27 18:20:29 -04:00
Cole Brown
cfbbb58a31 Document and clean AddrSubManager 2018-08-27 18:20:29 -04:00
Cole Brown
4a521e2e3b Update AddrManagerDatastore to require a Batching Datastore 2018-08-27 18:20:29 -04:00
Cole Brown
3778829de8 Abstract Peerstore tests, fix bugs 2018-08-27 18:20:29 -04:00
Cole Brown
c446ba70fe Add NewPeerstoreDatastore 2018-08-27 18:20:29 -04:00
Cole Brown
8d316aaa95 Clean tests 2018-08-27 18:20:29 -04:00
Cole Brown
00793e6244 Move Peers from Peerstore to AddrBook 2018-08-27 18:20:29 -04:00
Cole Brown
e8fbef6e78 Update native badger impl to support Peers 2018-08-27 18:20:29 -04:00
Cole Brown
95bb7b50ac Instrument DatastoreAddrManager with AddrSubManager 2018-08-27 18:20:29 -04:00
Cole Brown
5f74828c53 Flatten loops 2018-08-27 18:20:29 -04:00
Cole Brown
299007e9ca Break nesting via continues 2018-08-27 18:20:29 -04:00
Cole Brown
a43315d19c Use mutex hat pattern 2018-08-27 18:20:29 -04:00
Cole Brown
718adac0a2 Use NewAddrSubManager 2018-08-27 18:20:29 -04:00
Cole Brown
0b863436d8 Extract subscription manager from AddrManager 2018-08-27 18:20:29 -04:00
Cole Brown
7e46530328 Don't export ttl manager functions 2018-08-27 18:20:29 -04:00
Cole Brown
2d0ebcedd7 Accept parent ctx in constructor, simplify TTL loop 2018-08-27 18:20:29 -04:00
Cole Brown
04773c03ee goimports file 2018-08-27 18:20:29 -04:00
Cole Brown
ba6ac2671b Implement and test Datastore-backed AddrManager 2018-08-27 18:20:29 -04:00
Cole Brown
d06a57e781 Rename AddrManagerBadger -> BadgerAddrManager 2018-08-27 18:20:29 -04:00
Cole Brown
8fba05add1 Implement naive benchmark 2018-08-27 18:20:29 -04:00
Cole Brown
49769cb606 Implement badger backed addr manager, add to tests 2018-08-27 18:20:29 -04:00
Cole Brown
1016f6e956 Finish initial pass (sans stream) of addr manager 2018-08-27 18:20:29 -04:00
Cole Brown
b637498caf WIP: Begin work on a native badger peerstore 2018-08-27 18:20:29 -04:00
Cole Brown
0630ec7b05 Add simple benchmarking for peerstore 2018-08-27 18:20:29 -04:00
Steven Allen
4d62f4830a gx publish 1.4.24 2018-08-21 17:08:28 -07:00
Steven Allen
3a59fa1e00 gx publish 1.4.23 2018-08-08 18:49:47 -07:00