Commit Graph

2675 Commits

Author SHA1 Message Date
Hector Sanjuan
a2b89f9b3b
Release candidate v1.0.0-rc3 2022-03-28 20:44:41 +02:00
Hector Sanjuan
e19809af9d
Merge pull request #1621 from ipfs/rc-fixes
Fixes to BlockStream and adder
2022-03-28 20:44:13 +02:00
Hector Sanjuan
e287bd1189 adder/single: do not re-add the same node twice
The ipfsadder actually ends up DAG-putting some nodes several times
(i.e. non-leafs, root)... but usually one after the other. This prevents that
and avoids sending the same data multiple times over the wire (not a good
thing to 3x a small payload because of this).
2022-03-28 20:22:03 +02:00
Hector Sanjuan
f07c1e6552 fix: BlockStream rpc: only cancel response context at the end 2022-03-28 17:55:31 +02:00
Hector Sanjuan
8908da32be ipfshttp: abort adding when context cancelled 2022-03-28 17:54:55 +02:00
Hector Sanjuan
e06c1eb8e2 adder: Do not warn about errors when there were none 2022-03-28 13:59:09 +02:00
Hector Sanjuan
a10f608270
Release candidate v1.0.0-rc2 2022-03-25 13:41:04 +01:00
Hector Sanjuan
aeb69df560
Merge pull request #1617 from ipfs/fix-alternative-architectures
Fix builds on darwin, openbsd...
2022-03-25 13:39:34 +01:00
Hector Sanjuan
267d8c2a17 Fix builds on darwin, openbsd...
go-libp2p-connmgr does not build on some architectures due to some
dependencies (https://github.com/libp2p/go-libp2p-connmgr/pull/103). By
extension, go-libp2p does not build when using the connmgr.

The fix is in master.
2022-03-25 13:38:05 +01:00
Hector Sanjuan
116ee23b32
Release candidate v1.0.0-rc1 2022-03-24 20:06:15 +01:00
Hector Sanjuan
3f1591d544
Merge pull request #1616 from ipfs/fix/policy-gen
RPC: Remove BlockPut from the policy
2022-03-24 19:14:05 +01:00
Hector Sanjuan
15b51e8ab4
Merge pull request #1615 from ipfs/rpc-version-bump
Bump cluster rpc protocol version
2022-03-24 19:13:50 +01:00
Hector Sanjuan
41a33e40c1 RPC: Remove BlockPut from the policy
Since we removed the method
2022-03-24 19:13:11 +01:00
Hector Sanjuan
cf6c2ee85d Bump cluster rpc protocol version 2022-03-24 19:11:02 +01:00
Hector Sanjuan
5207cb34ae
Merge pull request #1614 from ipfs/feat/810-streaming-blocks
Adders: stream blocks to destinations
2022-03-24 18:56:03 +01:00
Hector Sanjuan
1d98538411 Adders: stream blocks to destinations
This commit fixes #810 and adds block streaming to the final destinations when
adding. This should add major performance gains when adding data to clusters.

Before, everytime cluster issued a block, it was broadcasted individually to
all destinations (new libp2p stream), where it was block/put to IPFS (a single
block/put http roundtrip per block).

Now, blocks are streamed all the way from the adder module to the ipfs daemon,
by making every block as it arrives a single part in a multipart block/put
request.

Before, block-broadcast needed to wait for all destinations to finish in order
to process the next block. Now, buffers allow some destinations to be faster
than others while sending and receiving blocks.

Before, if a block put request failed to be broadcasted everywhere, an error
would happen at that moment.

Now, we keep streaming until the end and only then report any errors. The
operation succeeds as long as at least one stream finished successfully.

Errors block/putting to IPFS will not abort streams. Instead, subsequent
blocks are retried with a new request, although the method will return an
error when the stream finishes if there were errors at any point.
2022-03-24 17:24:58 +01:00
Hector Sanjuan
400869efc0
Merge pull request #1613 from ipfs/update-go-codec-dagpb
Dependency: update go-codec-dagpb
2022-03-23 14:12:50 +01:00
Hector Sanjuan
2dd8d5b1ec Dependency: update go-codec-dagpb 2022-03-23 02:05:38 +01:00
Hector Sanjuan
3884f6a9d5
Merge pull request #1611 from ipfs/streaming-peers
Streaming Peers(): make Peers() a streaming call
2022-03-23 02:03:00 +01:00
Hector Sanjuan
eee53bfa4f Streaming Peers(): make Peers() a streaming call
This commit makes all the changes to make Peers() a streaming call.

While Peers is usually a non problematic call, for consistency, all calls
returning collections assembled through broadcast to cluster peers are now
streaming calls.
2022-03-23 01:27:57 +01:00
Hector Sanjuan
2d94c42310
Merge pull request #1607 from ipfs/feat/streaming-status
Pintracker: streaming methods
2022-03-22 15:52:34 +01:00
Hector Sanjuan
0d73d33ef5 Pintracker: streaming methods
This commit continues the work of taking advantage of the streaming
capabilities in go-libp2p-gorpc by improving the ipfsconnector and pintracker
components.

StatusAll and RecoverAll methods are now streaming methods, with the REST API
output changing accordingly to produce a stream of GlobalPinInfos rather than
a json array.

pin/ls request to the ipfs daemon now use ?stream=true and avoid having to
load the full pinset map on memory. StatusAllLocal and RecoverAllLocal
requests to the pin tracker stream all the way and no longer store the full
pinset, and the full PinInfo status slice before sending it out.

We have additionally switched to a pattern where streaming methods receive the
channel as an argument, allowing the caller to decide on whether to launch a
goroutine, do buffering etc.
2022-03-22 15:38:01 +01:00
Hector Sanjuan
d01fcdf25c
Merge pull request #1602 from ipfs/streaming-state
Pinset streaming and method type revamp
2022-03-19 12:38:52 +01:00
Hector Sanjuan
055afbfafd api client: do not break if streaming endpoint returns 204 2022-03-19 12:26:15 +01:00
Hector Sanjuan
957b3ec278 Sharness: fix tests for new pin ls json output 2022-03-19 12:19:12 +01:00
Hector Sanjuan
f5d78811c1 update go-libp2p-gorpc to 0.3.0 2022-03-19 12:09:23 +01:00
Hector Sanjuan
9b9d76f92d Pinset streaming and method type revamp
This commit introduces the new go-libp2p-gorpc streaming capabilities for
Cluster. The main aim is to work towards heavily reducing memory usage when
working with very large pinsets.

As a side-effect, it takes the chance to revampt all types for all public
methods so that pointers to static what should be static objects are not used
anymore. This should heavily reduce heap allocations and GC activity.

The main change is that state.List now returns a channel from which to read
the pins, rather than pins being all loaded into a huge slice.

Things reading pins have been all updated to iterate on the channel rather
than on the slice. The full pinset is no longer fully loaded onto memory for
things that run regularly like StateSync().

Additionally, the /allocations endpoint of the rest API no longer returns an
array of pins, but rather streams json-encoded pin objects directly. This
change has extended to the restapi client (which puts pins into a channel as
they arrive) and to ipfs-cluster-ctl.

There are still pending improvements like StatusAll() calls which should also
stream responses, and specially BlockPut calls which should stream blocks
directly into IPFS on a single call.

These are coming up in future commits.
2022-03-19 03:02:55 +01:00
Hector Sanjuan
b77ad92ade
Merge pull request #1599 from ipfs/fix/1598
Fix 1598: Include allocations in responses from /add
2022-03-15 11:51:36 +01:00
Hector Sanjuan
6b0b0afdb0
Dependency upgrades (#1600)
Dependency upgrades
2022-03-15 11:50:44 +01:00
Hector Sanjuan
1c8b6eea03 Adders: try to never return an empty peer ID as part of allocations 2022-03-15 11:34:09 +01:00
Hector Sanjuan
759dd4802d Fix 1598: Include allocations in responses from /add
This adds a new allocations field to add response objects which
provides the cluster peers to which the content has been allocated.

In the case of sharded dags, it provides peers for the current shard.
2022-03-15 11:03:11 +01:00
Hector Sanjuan
358057b289
Merge pull request #1483 from ipfs/feat/pinning-api
Feat: add a new API component that implements the Pinning services API
2022-03-14 15:04:00 +01:00
Hector Sanjuan
e4b11b783b Pinsvcapi: address comments from review
- Add "Created" field to pinInfo.
- Support before/after filter
- 404 when something is unpinned or on a non-recognize state
2022-03-14 12:21:08 +01:00
Hector Sanjuan
0c556ef4fa tests: fix staticcheck/vet errors 2022-03-11 16:47:41 +01:00
Hector Sanjuan
3029972750 pinsvcapi: test GetPin and DeletePin endpoints 2022-03-11 16:41:48 +01:00
Hector Sanjuan
c871c85f98 stateless: cast empty peer.ID correctly 2022-03-11 16:41:22 +01:00
Hector Sanjuan
fbc69ee3c6 pinsvcapi: fix several API test failures 2022-03-11 16:18:08 +01:00
Hector Sanjuan
cd5f9c869d pinsvcapi: Test and fix bugs in Add Pin. Improve performance. 2022-03-11 14:01:15 +01:00
Hector Sanjuan
f8812b3af7 pinsvc: fixes and testing for List endpoint 2022-03-11 12:58:12 +01:00
Hector Sanjuan
fe4c0f61c9 stateless: fix test mock rpc 2022-03-11 09:58:19 +01:00
Hector Sanjuan
ab33ec668c pinsvcapi: fix some basic bugs 2022-03-11 00:46:39 +01:00
Hector Sanjuan
333b933cd3 service: load pinsvc api first (just order consistency) 2022-03-11 00:45:44 +01:00
Hector Sanjuan
fd57a032e3 service: randomize pinsvcapi ports with --randomports too 2022-03-11 00:07:26 +01:00
Hector Sanjuan
5fed4a2c5e types: include IPFSAddresses in pinInfo objects.
pinsvcapi: do not cache peer information here as all the needed information is
in the status objects.

This adds ipfs_addresses as a field broadcasted with the ping metrics.
2022-03-10 23:49:01 +01:00
Hector Sanjuan
5b0d9d68e3 Merge branch 'master' into feat/pinning-api 2022-03-10 13:41:54 +01:00
Hector Sanjuan
e1ff8989b9
Merge pull request #1596 from ipfs/feat/batch-log-info
crdt: log when batches are committed
2022-03-10 13:31:50 +01:00
Hector Sanjuan
b8327e25e3 crdt: log when batches are committed 2022-03-10 00:15:12 +01:00
Hector Sanjuan
b37580f91f
Merge pull request #1592 from ipfs/feat/1564-status-cids-client
Support querying status for multiple CIDs in clients
2022-03-01 13:43:57 +01:00
Hector Sanjuan
00b7925e78 ipfs-cluster-ctl: support "status cid1 cid2 ..." 2022-03-01 13:25:07 +01:00
Hector Sanjuan
a1b6dabbb0 Add StatusCids() to Restapi client 2022-03-01 13:13:52 +01:00