Skip to content
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

Store object metadata in metabases for SearchV2 service #3080

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cthulhu-rider
Copy link
Contributor

@cthulhu-rider cthulhu-rider commented Jan 13, 2025

  • store metadata on Put
  • unfiltered
  • test scenarios for filtered
  • filtered
  • removal

@cthulhu-rider cthulhu-rider force-pushed the object-searchv2/metabases branch 4 times, most recently from 9624b00 to 3540889 Compare January 14, 2025 13:17
Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the object-searchv2/metabases branch from 3540889 to baf055c Compare January 15, 2025 11:40
Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the object-searchv2/metabases branch from f16c1c1 to 8957af6 Compare January 16, 2025 15:38
)

var (
maxUint256 = new(big.Int).SetBytes([]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it 127, 255, 255...? At least VM has signed 256-bit integers.

Copy link
Member

Choose a reason for hiding this comment

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

BTW, https://github.com/holiman/uint256 can be useful here, it's much faster than elastic big.Int (refs nspcc-dev/neo-go#1581).

pkg/local_object_storage/metabase/metadata.go Outdated Show resolved Hide resolved
metaPrefixA = byte(iota)
metaPrefixBI // integer attributes
metaPrefixBS // all other attributes
metaPrefixC
Copy link
Member

Choose a reason for hiding this comment

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

These better be named semantically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for sure, will do this finally. But for, now I'm used to naming from the task

var k []byte
// TODO: move to global funcs
makeKeyB := func(prefix byte, attr string, valLen int) (int, int) {
ln := 1 + oid.Size + len(attr) + valLen + len(utf8Delimiter)*2 // TODO: constantize some stuff
Copy link
Member

Choose a reason for hiding this comment

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

slices.Concat()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah i thought about this. Will make code improvement after functionaly stabilization if u dont mind

pkg/local_object_storage/metabase/metadata.go Show resolved Hide resolved
@cthulhu-rider cthulhu-rider force-pushed the object-searchv2/metabases branch 2 times, most recently from 41de769 to c29b7e5 Compare January 20, 2025 13:51
Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the object-searchv2/metabases branch from c29b7e5 to 00c7b83 Compare January 20, 2025 13:56
@carpawell carpawell mentioned this pull request Jan 20, 2025
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.

2 participants