Fix/Allow reading expired locked object #56
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#56
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/expired-locked-obj"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related to https://github.com/TrueCloudLab/frostfs-api/issues/2.
@ -103,0 +104,4 @@
if objectLocked(tx, addr.Container(), addr.Object()) {
return 0
}
Can we have an explicit unit-test for this behaviour?
@ -103,0 +104,4 @@
if objectLocked(tx, addr.Container(), addr.Object()) {
return 0
}
sure, added
@ -172,0 +183,4 @@
require.ErrorIs(t, err, meta.ErrObjectIsExpired)
// lock the obj
require.NoError(t, db.Lock(addr.Container(), oidtest.ID(), []oid.ID{addr.Object()}))
Can we lock an already expired object or is it only for tests here?
@ -172,0 +183,4 @@
require.ErrorIs(t, err, meta.ErrObjectIsExpired)
// lock the obj
require.NoError(t, db.Lock(addr.Container(), oidtest.ID(), []oid.ID{addr.Object()}))
yes, and i do not see any problems with that, you? in practice i think that is almost impossible if GC is configured to be relatively fast
@ -172,0 +183,4 @@
require.ErrorIs(t, err, meta.ErrObjectIsExpired)
// lock the obj
require.NoError(t, db.Lock(addr.Container(), oidtest.ID(), []oid.ID{addr.Object()}))
Unexpired object should not exits,
LOCK
ing it postfactum seems wrong.@ -172,0 +183,4 @@
require.ErrorIs(t, err, meta.ErrObjectIsExpired)
// lock the obj
require.NoError(t, db.Lock(addr.Container(), oidtest.ID(), []oid.ID{addr.Object()}))
Again, not for this PR.