Skip to content
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

Ideas For Refactoring coreunix.Adder #3277

Closed
kevina opened this issue Oct 1, 2016 · 1 comment
Closed

Ideas For Refactoring coreunix.Adder #3277

kevina opened this issue Oct 1, 2016 · 1 comment
Labels
need/analysis Needs further analysis before proceeding need/community-input Needs input from the wider community topic/commands:add Topic commands:add topic/core-api Topic core-api

Comments

@kevina
Copy link
Contributor

kevina commented Oct 1, 2016

In my opinion Currently coreunix.Adder is currently trying to do to many things at once. The coreunix.Adder should be simplified to only handle adding of single files. It should not concern it self with pinning (or if the GCLock is held for the matter) or creating directories objects.

To handle pinning the GCLock should be held before coreunix.Add is called. Add will then return the hash to add and the caller and it is the caller's job to pin it and release the GCLock.

Adding of directory should be handled in a similar fashion. First off, if the code is not there already there should be an easy way to create a directory object from a collection of nodes. Then the add command should add files individually and then create a directory object from from the added files rather than have coreunix.Adder build up the directory object.

Thoughts? Is This something we should Aim for?

This likely relates to how the refactoring for the core-api (#3173, #3174 and others) is handled.

CC: @whyrusleeping @lgierth.

@kevina kevina added need/community-input Needs input from the wider community topic/core-api Topic core-api topic/commands:add Topic commands:add labels Oct 1, 2016
@kevina kevina changed the title Ideas For Regactoring coreunix.Adder Ideas For Refactoring coreunix.Adder Oct 1, 2016
@whyrusleeping whyrusleeping added the need/analysis Needs further analysis before proceeding label Nov 28, 2016
@magik6k
Copy link
Member

magik6k commented May 15, 2019

Things happened since this issue was opened

@magik6k magik6k closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/analysis Needs further analysis before proceeding need/community-input Needs input from the wider community topic/commands:add Topic commands:add topic/core-api Topic core-api
Projects
None yet
Development

No branches or pull requests

3 participants