Skip to content

Store object tags as attributes along with a payload #1166

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

Merged
merged 2 commits into from
May 19, 2025

Conversation

smallhive
Copy link
Contributor

Closes #1153.

It would help to make tag based searches in the future.

@smallhive smallhive requested a review from roman-khimov as a code owner May 13, 2025 07:19
@smallhive smallhive force-pushed the 1153-extend-tag-storage-scheme branch from 1054a36 to 5100e11 Compare May 13, 2025 09:29
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about tag deletion?

)

if isEmptyVersion || isNullVersion {
versions, _, _, err := n.comprehensiveSearchAllVersionsInNeoFS(ctx, bktInfo, n.Owner(ctx), name, isNullVersion)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional searches can and should be avoided.

Copy link
Contributor Author

@smallhive smallhive May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you suggest searching all object versions + all meta objects for this version inside GetObjectTagging. Then filter out the required data in the code? Is it cheaper than two searches?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked

@smallhive
Copy link
Contributor Author

How about tag deletion?

It is a responsibility of #1158

@roman-khimov
Copy link
Member

I mean deleting tags of an object that had them set on put.

@smallhive smallhive force-pushed the 1153-extend-tag-storage-scheme branch from 5100e11 to 7c2d530 Compare May 16, 2025 08:16
@smallhive
Copy link
Contributor Author

I consider you mean this about tag removing.
To handle tag removal from the object itself, we store the tags' meta object with empty tags. Any tags meta object has priority against tags inside object attributes

@smallhive smallhive requested a review from roman-khimov May 16, 2025 08:21
smallhive added 2 commits May 19, 2025 11:06
Closes #1153.

Put object tags, inside tags-meta object attributes, would help to make tag based searches in the future.

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@smallhive smallhive force-pushed the 1153-extend-tag-storage-scheme branch from 7c2d530 to 39365be Compare May 19, 2025 07:11
@roman-khimov roman-khimov merged commit 20cf516 into master May 19, 2025
12 of 16 checks passed
@roman-khimov roman-khimov deleted the 1153-extend-tag-storage-scheme branch May 19, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend tag storage scheme
2 participants