Commit Graph

1818 Commits

Author SHA1 Message Date
Joonas Koivunen
6e54cc114c refactor: extract common type for the pinmode requirement 2021-01-07 16:07:34 +02:00
Joonas Koivunen
8f1b1a29b2 refactor: make PinMode copy
this wasn't done originally even if PinMode was quite simple, just to
see if there needs to be more complication later on.
2021-01-07 16:07:34 +02:00
Joonas Koivunen
e3de305e6b refactor: simplify matches 2021-01-07 15:46:00 +02:00
Joonas Koivunen
e1685c3d1c refactor: prefer into_owned 2021-01-07 15:46:00 +02:00
Joonas Koivunen
b3c439ed5d refactor: rename used methods without underscore 2021-01-07 15:46:00 +02:00
Joonas Koivunen
c69c09dae6 chore: mention sled pr in changelog 2021-01-07 15:46:00 +02:00
bors[bot]
158479b7c4
Merge #441
441: docs: unlink matrix and discord, issues for questions r=aphelionz a=koivunej

unlink the channel as we haven't had much presence there in the recent months. as an alternative, list issues.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2021-01-07 11:25:15 +00:00
Joonas Koivunen
f397f14b28 docs: use issues for questions 2021-01-07 13:21:23 +02:00
Joonas Koivunen
fa6a334814 readme: unlink matrix and discord
unlink the channel as we haven't had much presence there in the recent
months.
2021-01-07 13:21:23 +02:00
bors[bot]
26654e9cdf
Merge #440
440: ci: stop running dht interop tests for cross targets r=koivunej a=koivunej

The DHT interop tests were accidentially ran also with the `matrix.platform.cross` targets, this stops it.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2021-01-05 16:31:48 +00:00
Joonas Koivunen
9913ab8282 ci: stop running dht interop tests for cross targets 2021-01-05 18:30:31 +02:00
bors[bot]
d2951b715a
Merge #437
437: ci: no longer require review approvals to merge r=koivunej a=koivunej

This PR will allow `bors r+` before there are any review approvals. It will be good for smaller PRs like #436 or things which happen right before releasing. Alternatives include:
- to request and await for approvals (current situation)
- to merge without bors -- this is something I'd like to avoid doing

Now bors uses the PRs configuration so I don't require any approvals on this, but it has to come after #436 so that the workflow is fixed so at least this is gated on that :) So @aphelionz, @ljedrz, or anyone interested in this, how do you see this? I think the policy should still be to review all non-boring maintenance PRs.

I did check CONTRIBUTING.md and found that there is nothing regarding this.

I'll merge this at the earliest of tomorrow morning on +02:00.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2021-01-05 16:11:27 +00:00
bors[bot]
fdaf3a58d2
Merge #439
439: Use Key-value DB for DataStore and PinStore r=koivunej a=fetchadd

This PR is for using key-value db like sled as DataStore and PinSotre, so that it is more efficient for pinning and easy to realize MFS.

The FsDatastore is inefficiency now, when checking a indirect pinned cid, all file in the FsDatastore will be visited and read, what more important is that it is hard to distinguish the data for pinning and the data for DataStore. The key-value db like sled will bring convenience and efficiency in the next work with its high efficiency and easy key/value operation. Leveldb may be the first choice of key-value dbs, but now there are no suitable rust leveldb crates; Sled is fast and simple, and it is usable on servers and phones from any C-compatible language.

This PR is the reopen of [PR434](https://github.com/rs-ipfs/rust-ipfs/pull/434). For there is some verbose commits like "replaceing leveldb with sled",  the master branch of fetchadd/rust-ipfs in the PR434 is deprecated. Now the same changes are applied to the staging branch which is synced with the master of rust-ipfs/rust-ipfs. So Thanks for the PR of fetchadd/rust-ipfs from @koivunej which uses mutex to work around init(&self) and unsafe, but as the master is deprecated, I can only copy the code to staging branch. 

Accorrding to the review from @ koivunej in [PR434](https://github.com/rs-ipfs/rust-ipfs/pull/434), the `pinstore_interface_tests` is added to KvDataStore, and now all tests are passed.

Closes #434.

Co-authored-by: fetchadd <kaizengliu@qq.com>
2021-01-05 15:39:30 +00:00
fetchadd
d5ee450797 refactor: better code style and use OnceCell to init sled db 2021-01-05 22:16:46 +08:00
fetchadd
81f2f24494 feat: Using sled as DataStore and PinStore 2021-01-05 09:06:07 +08:00
bors[bot]
394b7ea665
Merge #435
435: Clippy changes for 1.49, doc fixes r=koivunej a=koivunej

Address latest warnings with 1.48. It feels like we should have gotten the `some_str == ""` in earlier versions as well, other than this these are just minor idiomatic changes. Also includes:
 - a previously forgotten panic documentation on ipfs-unxifs walker
 - workflow fix to enable merges again (see #436)

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2021-01-04 11:13:50 +00:00
Joonas Koivunen
2c3bc09aa5 ci: remove ci-failure step
bors behaviour changed some time ago w.r.t. having tasks with a single
name but one passed and one skipped. perhaps this will work without one
as well.
2021-01-04 13:11:40 +02:00
Joonas Koivunen
e469de3b42 ci: no longer require review approvals to merge 2021-01-04 12:32:30 +02:00
Joonas Koivunen
6eea46d7b7 doc: enhance Walker docs for linking
not sure if the wording is at all correct but this is at least a bit
more correct.
2021-01-04 10:55:07 +02:00
Joonas Koivunen
5801e006b2 doc: document panic with Walker::pending_links 2021-01-04 10:55:07 +02:00
Joonas Koivunen
7c9fae92c2 refactor: remove extra lifetime 2021-01-04 10:55:07 +02:00
Joonas Koivunen
3afbd47f0d chore: remove noop use stmt 2021-01-04 10:55:07 +02:00
Joonas Koivunen
126b7c70bc refactor: use .is_empty() instead of == "" 2021-01-04 10:55:07 +02:00
Joonas Koivunen
e5da3b9d3a refactor: use .collect() instead of FromIterator::from_iter 2021-01-04 10:55:07 +02:00
Joonas Koivunen
55f5995f08 refactor: turn into range contains check 2021-01-04 10:55:07 +02:00
Joonas Koivunen
2cbb58c4d6 chore: fix default() followed by mutation
clippy warning
2021-01-04 10:55:07 +02:00
bors[bot]
d3a3c6921e
Merge #432
432: Clippy lints in 1.48 r=koivunej a=koivunej

Minor fixes.

Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
2020-12-08 14:45:57 +00:00
Joonas Koivunen
9d2888ec53 chore: whitespace at eol 2020-12-08 14:53:46 +02:00
Joonas Koivunen
911fab510a chore: clippy push_str with single char str 2020-12-08 14:53:32 +02:00
Joonas Koivunen
6c7ce3747c chore: clippy extra return 2020-12-08 14:53:12 +02:00
Joonas Koivunen
232822ca58 chore: clippy strip prefix 2020-12-08 14:52:53 +02:00
Joonas Koivunen
5836fe194c chore: clippy unnecessary lazy eval 2020-12-08 14:52:27 +02:00
bors[bot]
75ed11a85d
Merge #416
416: Fix more missing doc warnings r=koivunej a=niklaslong

Follow up to #409 and part of #197.


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-11-17 15:23:24 +00:00
Niklas Long
49b54bd45d docs: code review suggestions 2020-11-17 16:19:58 +01:00
bors[bot]
b1e83a69f7
Merge #429
429: feat: repo locking with fs2 r=koivunej a=niklaslong

supersedes #426 and resolves #243. 

This implements repo locking with fs2. The only concern for this crate is that it is poorly maintained but the functionality we need seems stable enough for now. 

Certain tests are currently failing, notably because multiple nodes are being created with the same repo (dag tests for instance). Not sure what the solution to this will be...

Update: running tests with `--test-threads=1` passes all unit tests. The integration tests fail (I think because multiple nodes are being spun up with the same repo). 

Update 2: all green, making sure test nodes use a different temp dir for the repo fixed the tests.

Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-11-17 14:55:55 +00:00
Niklas Long
404a61cb4c refactor: drop lockfile guard to avoid deadlocks 2020-11-17 15:40:06 +01:00
Niklas Long
70a9e992c7 refactor: clearer naming for lock related fields/error variants 2020-11-17 12:15:48 +01:00
Niklas Long
500e401a7a refactor: improve lock error variants 2020-11-17 11:40:19 +01:00
Niklas Long
a5e8116b71 feat: introduce repo locking error handling 2020-11-16 18:17:55 +01:00
Niklas Long
1fcf50029f refactor: move repo locking into init
Repo locking was previously performed on repo::new, this keeps
the Lock struct initialisation in repo::new but moves the locking into
repo::init.
2020-11-16 16:29:50 +01:00
bors[bot]
3fc24b0705
Merge #430
430: doc: update README r=koivunej a=niklaslong

What follows is just a suggestion. This updates the README with a _running the tests_ section, fixes the TOC, moves the _contributing_ section to where it's more obvious and links to the http crate tutorial. 


Co-authored-by: Niklas Long <niklas@equilibrium.co>
2020-11-16 09:02:39 +00:00
Niklas Long
9cafca73a3 doc: small tweaks to readme testing instructions 2020-11-16 09:52:58 +01:00
Niklas Long
2d99259367 refactor: remove unneeded #[async_trait] 2020-11-13 17:10:31 +01:00
Niklas Long
d8f9595b31 doc: update README 2020-11-13 11:33:01 +01:00
Niklas Long
cb30d0d0b2 docs(repo): add missing docs for repo variants 2020-11-13 10:25:49 +01:00
Niklas Long
2521cf8cfd docs(repo): add missing docs for repo and pinning 2020-11-13 10:25:49 +01:00
Niklas Long
1098f3102e fix(repo): fix typo in pinning strategy error msg 2020-11-13 10:25:49 +01:00
Niklas Long
474a392283 doc: add missing docs for Node module 2020-11-13 10:25:49 +01:00
Niklas Long
51793ed158 doc(libp2p): add missing Kademlia query result docs 2020-11-13 10:25:49 +01:00
Niklas Long
b1a0709c91 doc(libp2p): add missing pubsub docs 2020-11-13 10:25:49 +01:00