-
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
fix/Removed object listing #2526
fix/Removed object listing #2526
Conversation
0ba3e7f
to
e4a979b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2526 +/- ##
=======================================
Coverage 29.68% 29.69%
=======================================
Files 404 404
Lines 30711 30718 +7
=======================================
+ Hits 9117 9122 +5
- Misses 20825 20826 +1
- Partials 769 770 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
3e9bc4b
to
0eb8342
Compare
@@ -121,7 +121,7 @@ func (db *DB) selectObjects(tx *bbolt.Tx, cnr cid.ID, fs object.SearchFilters, c | |||
addr.SetContainer(cnr) | |||
addr.SetObject(id) | |||
|
|||
if objectStatus(tx, addr, currEpoch) > 0 { | |||
if objectStatus(tx, addr, currEpoch) > 0 && !objectLocked(tx, cnr, id) { |
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.
did you think about return specific status from objectStatus
for locked objects?
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.
what is your idea exactly? in search operations be ready to return objects and status code if any locked objects have been found?
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.
oh, sorry, got you wrong
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.
found your idea usefull (but current codebase does not require a separate code for removed-but-locked objects, so 0
is ok for now), check, please
64aff79
to
4f133ae
Compare
4f133ae
to
e8c4c77
Compare
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Also includes a test for removed but locked objects. Refs nspcc-dev#2376. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev#2376. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
It makes logic more reliable if a single function is responsible for the removed/expired/locked statuses. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
e8c4c77
to
3ec865e
Compare
No description provided.