EnumerateChildrenAsync has been renamed to WalkParallel to reflect the fact
that:
1. It visits the root.
2. It's parallel, not async.
To mirror this change, EnumerateChildren has also been renamed to Walk and now
behaves the same (except that it's not parallel).
We do this _just_ to make the error nicer but it's really slow. Additionally, we
do it while holding the pin lock, blocking all other pin operations.
fixes#6295
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
We were canceling the context in `GarbageCollect` but some functions call `GC`
directly. Move the context cancelation down to where we actually _need_ it.
fixes#6279
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Most of these are probably harmless but a few looked like they might actually be
bugs. Most of them are just faulty tests.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Events:
1. User triggers a GC.
2. User aborts the GC.
3. We fail to delete a block when the output channel is already full.
This is really unlikely to happen in practice but it's still incorrect.
Could be related to #6107
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Switch _back_ to the 0.4.18 style of peer IDs while we figure things out. See
https://github.com/libp2p/specs/issues/138.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Turns out that `pool.Put(buf)` had to *allocate* because we needed to turn
`[]byte` into `interface{}`. Apparently, we've never done this correctly we just
never noticed because we never really used buffer pools extensively.
However, since migrating yamux to a buffer-pool backed buffer, this started
showing up in allocation profiles.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
* go-datastore and friends: GetSize
* badger: new release, fewer allocations
* go-mplex: send fewer packets
* go-bitswap: pack multiple blocks in a single message, fewer allocations
* go-buffer-pool: replace the buffer pool from go-msgio
* yamux: fixed data race and uses go-buffer-pool for stream read-buffers to
reduce memory and allocations.
* go-libp2p-secio: get rid of a hot-spot allocation
* go-libp2p-peerstore: reduced allocations (at the cost of some memory)
More?
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Also:
* Switch to gogo for filestore for consistency.
* Use the "faster" codegen for fewer allocations.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>