-
Notifications
You must be signed in to change notification settings - Fork 38
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
neofs-lens: storage status new command #2591
neofs-lens: storage status new command #2591
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2591 +/- ##
==========================================
- Coverage 29.71% 29.62% -0.09%
==========================================
Files 411 416 +5
Lines 31431 31523 +92
==========================================
Hits 9339 9339
- Misses 21280 21372 +92
Partials 812 812
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
6163fa2
to
345cc44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd try simplifying the interface, even though metabase one does require some specifics. And maybe only deal with cases where there is some data for the object, lots of inexistence errors are not very useful (we can have a lot of shards).
Blob blobstor.ObjectStatus | ||
Metabase meta.ObjectStatus | ||
Writecache writecache.ObjectStatus | ||
Errors []error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really unobvious what this slice means without looking into the implementation.
res.State = append(res.State, "AVAILABLE") | ||
} | ||
if removedStatus == 1 { | ||
res.State = append(res.State, "GC MARKED") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so in the worst scenario, could it print LOCKED AVAILABLE AVAILABLE GC MARKED
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be such a situation when an object is inBucket and inGraveyardWithKey at the same time?
if so it could be LOCKED AVAILABLE AVAILABLE GC MARKED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"AVAILABLE AVAILABLE" is better be avoided, you can use some different terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would expect printing statuses if they are interested, e.g.: a regular available object -- shard ID, if locked, another line in the print about it, if removed but locked -- one more line. if not found at all -- just "not found" line or smth like that
it could be such a situation when an object is inBucket
depends on what bucket we are talking about. but an object can be placed in a shard, be removed but be locked so LOCKED AVAILABLE AVAILABLE GC MARKED
seems reachable (but not clear)
9067829
to
8222ff4
Compare
@roman-khimov what do you mean by
it seems that metabase does not have any other specifications.
|
I mean it differs from "normal" storages. |
res.State = append(res.State, "AVAILABLE") | ||
} | ||
if removedStatus == 1 { | ||
res.State = append(res.State, "GC MARKED") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"AVAILABLE AVAILABLE" is better be avoided, you can use some different terms.
res.State = append(res.State, "AVAILABLE") | ||
} | ||
if removedStatus == 1 { | ||
res.State = append(res.State, "GC MARKED") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would expect printing statuses if they are interested, e.g.: a regular available object -- shard ID, if locked, another line in the print about it, if removed but locked -- one more line. if not found at all -- just "not found" line or smth like that
it could be such a situation when an object is inBucket
depends on what bucket we are talking about. but an object can be placed in a shard, be removed but be locked so LOCKED AVAILABLE AVAILABLE GC MARKED
seems reachable (but not clear)
8222ff4
to
39c2cfe
Compare
39c2cfe
to
0be3397
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase again, the CHANGELOG has changed.
2549f5d
to
b9c6606
Compare
This command prints out information about storage and its components, where object is located. It can be useful for object inspection and storage health check. Refs: #2550. Signed-off-by: Ekaterina Pavlova <[email protected]>
b9c6606
to
4c1ab5e
Compare
New command:
Expected result looks like:
In the initial issue was proposed to display only parts of the storage where the object belongs. As for now, this command displays all parts of storage. what do you think about it? also, there is a question about word choice and error display.
Refs: #2550.