Comments (5)
Agreed, we're imposing the batch.
it would be the user of the
importer
responsibility to callCommit
when the importer has returned, if aBatch
dag service was used in the first place.
Could we expand the DagBuilderParams.New
function (or create a new one) to allow to set (or not) the batch service? That way we could maintain the DagBuilderHelper
responsibility of calling commit if the batch service was set in the first place (to avoid laying that burden on the user of the importers that would need to add the Commit
line after every already existing Layout
call). Would that work for you?
from go-unixfs.
@schomatis that works (hopefully the code can stay clean-ish).
Still, I do feel the batching or not batching should not be a responsability of this module. We could take the chance that this is only used in ipfs and cluster to simplify it. Adding the batch wrapping directly on go-ipfs when adding is by all means a very simple task and it's probably where it should be (in a explicit fashion). Your call!
from go-unixfs.
Yes, I kind of agree, when I was refactoring the balanced builder the close/commit logic felt kind of weird. It's fine by me if you want to take out the commit logic part (or ping me if you need help), cc'ing @Stebalien in case he wants to weigh in here.
from go-unixfs.
@Stebalien any feedback? @whyrusleeping (this might affect fc too)
from go-unixfs.
I agree this is a higher-level concern. If a user passes a batch into the importer, the user is responsible for committing the batch.
This is probably left-over from when this was built-in to go-ipfs (and we didn't really care about other users).
from go-unixfs.
Related Issues (20)
- Do not add an internal timeout for "extra" fetches used to compute directory size in the unsharding algorithm HOT 4
- [unsharding] Follow up on some low-priority fixes/renames/refactors HOT 1
- The context in `CtxReadFull` is not propagated to the child nodes being read HOT 4
- Trying to use in project, fails with go-merkledag errors HOT 2
- Avoid use of `pb.Data` HOT 6
- `Sync()`/`modifyDag()`: correctly handle offsets bigger than file size HOT 3
- Use only one kind of variable to refer to data types HOT 1
- Remove the `child` interface from the `hamt` package HOT 6
- Maybe we could use `ResolveLink` HOT 1
- Remove the internal `ProtoNode` from the `Shard` structure HOT 19
- HAMT: evaluate using the DAG walker in `getValue` HOT 3
- HAMT: review `getValue` and `walkTrie` HOT 1
- `go-merkledag` dependency version discrepancy with `go-ipfs` HOT 9
- Can we remove the `expandSparse` call in `WriteAt`? HOT 5
- "Impedance mismatch" between mode as specified in spec/UNIXFS.md and go's os.FileMode HOT 7
- Add created/modified fields to unixfs files HOT 2
- State of UnixFS v2 HOT 3
- Plan a transition of unixfs to go-ipld-prime HOT 7
- Remove `HAMTShard` UnixFS type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-unixfs.