object/transformer: Add expiration epoch to each part of big object #319
No reviewers
TrueCloudLab/storage-services-developers
TrueCloudLab/storage-services-committers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#319
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "a-savchuk/frostfs-sdk-go:parent-parent-attrs-in-ec"
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?
Suppose you have a container with an EC placement policy and you want to store a big object. The object is divided as follows: object -> parts -> chunks. After splitting, the original object's attributes are stored in the last part and linking object as the parent's header. When the parts are divided into chunks, the chunks don't contain information about the original object's attributes, particularly expiration epoch. As a result, chunks of a big object do not expire.
Let's add expiration epoch to each (for now only parts on splitting a big object.
I've checked this new solution not only for the case described above, but also for all possible scenarios: different object sizes (small and big objects) and different placement policies (REP and EC). Checked with dev-env, for details, see my script. I also attached the script output here.
cda1c5b40d
to0da5be5632
@ -33,19 +33,21 @@ func (c *Constructor) Split(obj *objectSDK.Object, key *ecdsa.PrivateKey) ([]*ob
chunk.SetPayload(payloadShards[i])
chunk.SetPayloadSize(uint64(len(payloadShards[i])))
attributes := obj.Attributes()
Split()
function so easily -- we have already created EC objects on deployed systems, what will happen with them?obj.Attributes()
? Does it contain any info ifobj.Parent() != nil
?ParentAttributes()
has parent attributes, butAttributes()
has actuallyParent.Parent.Attributes()
. It seems misleading.I think nothing will happen. It'll make new objects expire correctly, but old object won't be deleted upon expiration.
For now, no. After the recent changes, each part will have an expiration epoch.
Yes, this is a problem. New solution is to add an expiration epoch only.
I think that's not accurate. I only changed the attributes returned by
ParentAttributes()
, as far as I can see, for nowAttributes()
currently returns nothing.Anyway, now I add an expiration epoch during the first splitting of an object instead.
object: Store EC chunk's parent parent's attributesto WIP: object: Store EC chunk's parent parent's attributes0da5be5632
to48b48ced15
48b48ced15
to8389887a34
WIP: object: Store EC chunk's parent parent's attributesto object/transformer: Add expiration epoch to each part of big object@ -330,0 +331,4 @@
// add expiration epoch to each part
for _, attr := range s.parAttrs {
if attr.Key() == objectV2.SysAttributeExpEpoch {
We may rely on
s.current
having empty set of attributes in other places.prepareFirstChild
, why do second child inherit the attribute?I'll check
Because each child is initialized from the previous one
s.current = fromObject(s.current)