Anton Evangelatov
bb55b0fb53
swarm/storage: add comparison towards leveldb.ErrNotFound ( #19243 )
...
* swarm/storage: add comparison towards leveldb.ErrNotFound
* swarm/storage: wrap leveldb ErrNotFound
6 years ago
Janoš Guljaš
f0233948d2
swarm/chunk: move chunk related declarations to chunk package ( #19170 )
6 years ago
Matthew Halpern
fbedf62f3d
swarm/storage: fix loop bound for database cleanup ( #19085 )
...
The current loop continuation condition is always true as a uint8
is always being checked whether it is less than 255 (its maximum
value). Since the loop starts with the value 1, the loop termination
can be guarranteed to exit once the value overflows to 0.
6 years ago
Elad
5b8ae7885e
swarm/storage: fix influxdb gc metrics report ( #19102 )
6 years ago
Janoš Guljaš
3fd6db2bf6
swarm: fix network/stream data races ( #19051 )
...
* swarm/network/stream: newStreamerTester cleanup only if err is nil
* swarm/network/stream: raise newStreamerTester waitForPeers timeout
* swarm/network/stream: fix data races in GetPeerSubscriptions
* swarm/storage: prevent data race on LDBStore.batchesC
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461775049
* swarm/network/stream: fix TestGetSubscriptionsRPC data race
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461768477
* swarm/network/stream: correctly use Simulation.Run callback
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-461783804
* swarm/network: protect addrCountC in Kademlia.AddrCountC function
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462273444
* p2p/simulations: fix a deadlock calling getRandomNode with lock
https://github.com/ethersphere/go-ethereum/issues/1198#issuecomment-462317407
* swarm/network/stream: terminate disconnect goruotines in tests
* swarm/network/stream: reduce memory consumption when testing data races
* swarm/network/stream: add watchDisconnections helper function
* swarm/network/stream: add concurrent counter for tests
* swarm/network/stream: rename race/norace test files and use const
* swarm/network/stream: remove watchSim and its panic
* swarm/network/stream: pass context in watchDisconnections
* swarm/network/stream: add concurrent safe bool for watchDisconnections
* swarm/storage: fix LDBStore.batchesC data race by not closing it
6 years ago
holisticode
41597c2856
swarm: Debug API and HasChunks() API endpoint ( #18980 )
6 years ago
Anton Evangelatov
9e9fc87e70
swarm: remove unused/dead code ( #18351 )
6 years ago
lash
a6942b9f25
swarm/storage: Batched database migration ( #18113 )
6 years ago
Ferenc Szabo
c41e1bd1eb
swarm/storage: fix garbage collector index skew ( #18080 )
...
On file access LDBStore's tryAccessIdx() function created a faulty
GC Index Data entry, because not indexing the ikey correctly.
That caused the chunk addresses/hashes to start with '00' and the last
two digits were dropped. => Incorrect chunk address.
Besides the fix, the commit also contains a schema change which will
run the CleanGCIndex() function to clean the GC index from erroneous
entries.
Note: CleanGCIndex() rebuilds the index from scratch which can take
a really-really long time with a huge DB (possibly an hour).
6 years ago
Ferenc Szabo
8080265f3f
swarm/storage: fix access count on dbstore after cache hit ( #17978 )
...
Access count was not incremented when chunk was retrieved
from cache. So the garbage collector might have deleted the most
frequently accessed chunk from disk.
Co-authored-by: Ferenc Szabo <ferenc.szabo@ethereum.org>
6 years ago
Ferenc Szabo
54f650a3be
swarm: clean up unused private types and functions ( #17989 )
...
* swarm: clean up unused private types and functions
Those that were identified by code inspection tool.
* swarm/storage: move/add Proximity GoDoc from deleted private function
The mentioned proximity() private function was deleted in:
1ca8fc1e6f
6 years ago
lash
dc3c3fb1e1
swarm/storage: Add accessCnt for GC ( #17845 )
6 years ago
Anton Evangelatov
303b99663e
swarm: schemas and migrations ( #17813 )
6 years ago
Emil
86a03f97d3
all: simplify s[:] to s where s is a slice ( #17673 )
6 years ago
Balint Gabor
3ff2f75636
swarm: Chunk refactor ( #17659 )
...
Co-authored-by: Janos Guljas <janos@resenje.org>
Co-authored-by: Balint Gabor <balint.g@gmail.com>
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
Co-authored-by: Viktor Trón <viktor.tron@gmail.com>
6 years ago
Anton Evangelatov
ff3a5d24d2
swarm/storage: remove redundant increments for dataIdx and entryCnt ( #17484 )
...
* swarm/storage: remove redundant increments for dataIdx and entryCnt
* swarm/storage: add Delete to LDBStore
* swarm/storage: wait for garbage collection
6 years ago
Elad
580145e96d
swarm/storage: added metrics for db entry count ( #17589 )
6 years ago
Anton Evangelatov
a8aa89accb
swarm/storage: cleanup task - remove bigger chunks ( #17424 )
6 years ago
Anton Evangelatov
7c9314f231
swarm: integrate OpenTracing; propagate ctx to internal APIs ( #17169 )
...
* swarm: propagate ctx, enable opentracing
* swarm/tracing: log error when tracing is misconfigured
6 years ago
ethersphere
e187711c65
swarm: network rewrite merge
6 years ago