mirror of
https://github.com/nspcc-dev/neofs-s3-gw.git
synced 2026-03-01 04:29:15 +00:00
Don't return version-id to HeadObject and GetObject in unversioned bucket #278
Labels
No labels
I2
I2
I3
I4
S2
S3
S4
S4
U0
U1
U2
U2
U3
U4
U4
auth-mate
blocked
bug
config
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
performance
question
security
test
tree-service
tree-service
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-s3-gw#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @masterSplinter01 on GitHub (Jul 5, 2022).
Originally assigned to: @masterSplinter01 on GitHub.
In a
tree-servicebranch:@masterSplinter01 commented on GitHub (Jul 11, 2022):
After some view I think we should to do the following things:
ObjectInfoas in independent struct, in almost most usages we extract it fromExtendedObjectInfo.ObjectInfowill remain, but we can replace usagesObjectInfowithExtendedObjectInfoinlayerpackageObjectInfoas methods ofExtendedObjectInfo.ObjectVersionInfo:seems redundant, we can use
ExtendedObjectInfoinstead of this.@alexvanin commented on GitHub (Jul 12, 2022):
I think the issues with this is that
ObjectInfois formed based onobject.Head()response, andExtendedObjectInforequires RPC with tree service. So they originate from different network requests, I think it is a good reason to keep them separated.It has pros: use single structure in the code. But it also has cons: if
layerdoesn't need to work with versions, why bother and passExtendedObjectInfoinstead ofObjectInfo?I guess we can inline
ObjectInfointoExtendedObjectInfolikeIt seems so.
/cc @KirillovDenis
@masterSplinter01 commented on GitHub (Jul 12, 2022):
I don't suggest to drop
ObjectInfo. I suggest to make it an unexported struct.Wherever we call
objectHead(withobjectInfoFromMeta) andobjectInfoFromObjectsCacheOrNeoFSwe already have made requests to the tree service.I'm not sure it will be enough, the reason why we should move methods from
ObjectInfotoExtendedObjectInfois ability return correct version withVersionfunction:nullorversion-id.ExtendedObjectInfohas enough information to answer the question,ObjectInfohasn't. And we will not have to check what returnedVersionand fix it after like here:@KirillovDenis commented on GitHub (Jul 13, 2022):
Yes, but here and therefore here we don't need additional fields from
ExtendedObjectInfo.Let's just add (not move)
Versionmethod toExtendedObjectInfo.@KirillovDenis commented on GitHub (Jul 13, 2022):
Maybe we can introduce new function
GetExtendedObjectInfoalong withnspcc-dev/neofs-s3-gw@04fe747972/api/layer/layer.go (L216)and use it when necessary?