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

Provide writing of a single object to the metabase #1816

Closed
cthulhu-rider opened this issue Sep 27, 2022 · 5 comments · Fixed by #2554
Closed

Provide writing of a single object to the metabase #1816

cthulhu-rider opened this issue Sep 27, 2022 · 5 comments · Fixed by #2554
Assignees
Labels
discussion Open discussion of some problem enhancement Improving existing functionality good first issue Good for newcomers neofs-lens NeoFS Lens app issues
Milestone

Comments

@cthulhu-rider
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I can't add single object (e.g. stored in file) to the metabase using CLI. The only thing I can do is to re-sync the metabase with the blobstor on neofs-node startup.

Describe the solution you'd like

$ neofs-lens meta write --obj $OBJ_PATH --path $META_DST
Object has been successfully written to the metabase.

Describe alternatives you've considered

Not yet.

Additional context

I tried to push an object into a node by writing it into the node's FSTree. That wasn't enough since I also needed to add a record to the metabase. I could also turn any shard to degraded mode, but that wasn't an option in my case. So the only thing I could do is to restart storage node with metabase re-sync.

@cthulhu-rider cthulhu-rider added enhancement Improving existing functionality good first issue Good for newcomers triage neofs-lens NeoFS Lens app issues labels Sep 27, 2022
@carpawell
Copy link
Member

carpawell commented Sep 27, 2022

How about a new RPC to the control service? It could check the correctness of the object (marshaling, required fields check, etc) and put it according to Storage Engine rules (correct shard, correct indexing, correct notification/lock/removal flows). No need to perform more than one action (put to FTTree (or blobovniczas?), put to meta), and no need to think about any internal object relations.

Looks weird but anyway we already allow dropping any object if you control the node despite any policy/logic/other thoughts.

@carpawell
Copy link
Member

And, moreover, that CLI has been called "lens" for some reason.

@cthulhu-rider cthulhu-rider added the discussion Open discussion of some problem label Sep 27, 2022
@cthulhu-rider
Copy link
Contributor Author

And, moreover, that CLI has been called "lens" for some reason.

lens name does not block the application to perform writing operations. The name was chosen as pretty short and laconic, but not to limit functionality.

@cthulhu-rider
Copy link
Contributor Author

How about a new RPC to the control service?

@carpawell Control service LGTM to prevent application shutdown (its process locks all metabases). What about "offline" cases? I think simple read-write command can also be useful.

@carpawell
Copy link
Member

lens name does not block the application to perform writing operations

Well, i was not thinking about naming only: the general purpose for that CLI looked as read-only for me but i could be wrong.

What about "offline" cases?

If we are possible to face such cases, neofs-lens meta write could be useful of course. But generally speaking, do not know when it could happen.

AliceInHunterland added a commit that referenced this issue Sep 7, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
AliceInHunterland added a commit that referenced this issue Sep 7, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
AliceInHunterland added a commit that referenced this issue Sep 11, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
AliceInHunterland added a commit that referenced this issue Sep 11, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
AliceInHunterland added a commit that referenced this issue Sep 12, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
AliceInHunterland added a commit that referenced this issue Sep 12, 2023
This command places the object into the metabase. It can be useful if
you want to add an object directly to the metabase.

Closes #1816.

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
@roman-khimov roman-khimov added this to the v0.38.0 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Open discussion of some problem enhancement Improving existing functionality good first issue Good for newcomers neofs-lens NeoFS Lens app issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants