-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract dagservice and friends from go-ipfs #8
Commits on Oct 16, 2017
-
Configuration menu - View commit details
-
Copy full SHA for ac092e5 - Browse repository at this point
Copy the full SHA ac092e5View commit details -
[WIP] [RFC] extract dagservice and friends from go-ipfs
This is a WIP/RFC attempt at extracting DAGService from go-ipfs.
Configuration menu - View commit details
-
Copy full SHA for b3a1f4b - Browse repository at this point
Copy the full SHA b3a1f4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f9e9ed - Browse repository at this point
Copy the full SHA 0f9e9edView commit details -
replace LinkService with an optional LinkGetter interface
This way, not *all* DAGServices need to implement this interface, they can just implement it as an optimization.
Configuration menu - View commit details
-
Copy full SHA for 2696405 - Browse repository at this point
Copy the full SHA 2696405View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5837bec - Browse repository at this point
Copy the full SHA 5837becView commit details -
NodePromise: replace interface with concrete type
Also: 1. Specify the threading guarantees. 2. Vastly simplify it to use a single channel for synchronization.
Configuration menu - View commit details
-
Copy full SHA for c0311d7 - Browse repository at this point
Copy the full SHA c0311d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 339e9ea - Browse repository at this point
Copy the full SHA 339e9eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bc8a07 - Browse repository at this point
Copy the full SHA 5bc8a07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30aecc4 - Browse repository at this point
Copy the full SHA 30aecc4View commit details -
Make DAGService.Remove take a CID.
We're going to want to do this eventually and we have to refactor anyways so we might as well do this now. Fixes ipfs/kubo#4010
Configuration menu - View commit details
-
Copy full SHA for 2f52265 - Browse repository at this point
Copy the full SHA 2f52265View commit details -
dag: move GetMany from DAGService to NodeGetter
This will allow many consumers of `DAGService` to take `NodeGetter` instead and implementing `GetMany` for all `NodeGetter`s is pretty trivial.
Configuration menu - View commit details
-
Copy full SHA for 3380389 - Browse repository at this point
Copy the full SHA 3380389View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2fc6ce - Browse repository at this point
Copy the full SHA f2fc6ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07869d6 - Browse repository at this point
Copy the full SHA 07869d6View commit details -
It really just doesn't fit. We're working on making this method obsolete anyways.
Configuration menu - View commit details
-
Copy full SHA for 5225978 - Browse repository at this point
Copy the full SHA 5225978View commit details -
port async batch commit code from ipfs
(ipfs/kubo#4296) 1. Modern storage devices (i.e., SSDs) tend to be highly parallel. 2. Allows us to read and write at the same time (avoids pausing while flushing). fixes ipfs/kubo#898 (comment)
Configuration menu - View commit details
-
Copy full SHA for 1af7e81 - Browse repository at this point
Copy the full SHA 1af7e81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0408f8d - Browse repository at this point
Copy the full SHA 0408f8dView commit details
Commits on Nov 15, 2017
-
1. Add is already idempotent. This makes remove match. 2. Generally, all we care about is that the node no longer exists in the DAG. If two callers remove a node at the same time, they should both succeed. Currently, we *ignore* the result of Remove in go-ipfs. IMO, it would be better to let errors be *errors* and only return an error if something goes wrong. 3. This can be significantly faster. It allows us to batch/queue removes (as long as we guarantee that they'll eventually happen). 4. This matches how most databases/key-value stores operate. An alternative would be to return `(deleted bool, err error)` but then we don't get the speedup.
Configuration menu - View commit details
-
Copy full SHA for 6f9115b - Browse repository at this point
Copy the full SHA 6f9115bView commit details
Commits on Nov 16, 2017
-
The caller can just call `node.Cid()` and returning CIDs from `AddMany` requires allocation.
Configuration menu - View commit details
-
Copy full SHA for b403323 - Browse repository at this point
Copy the full SHA b403323View commit details -
Configuration menu - View commit details
-
Copy full SHA for f10b5dd - Browse repository at this point
Copy the full SHA f10b5ddView commit details -
add contexts to Add/Remove methods
We'll need these for slower/remote datastores.
Configuration menu - View commit details
-
Copy full SHA for 44a7801 - Browse repository at this point
Copy the full SHA 44a7801View commit details -
I considered (well, implemented then threw it away) allowing contexts on all calls to Batch (Add, Commit, etc). However, really, you should treat a batch as a single large "operation". I also went down the road of generalizing batches to sessions. However, it became immediately obvious that permitting add *and* remove *and* fetch would require a lot of bookkeeping and that you'd lose a lot of performance. So, we'll do that separately.
Configuration menu - View commit details
-
Copy full SHA for 6cf32cc - Browse repository at this point
Copy the full SHA 6cf32ccView commit details