Search for objects won't work in EC-container #1347

Closed
opened 2024-09-02 09:30:32 +00:00 by aarifullin · 2 comments
Member

Expected Behavior

Search with attribute filters works correctly in EC-container and shows OID

Current Behavior

Search for simple objects by attibute filters shows no result

Possible Solution

Fix the metabase

Steps to Reproduce (for bugs)

Object: simple

  1. Create container with EC-policy

  2. Put a simple object with a few attributes

frostfs-cli object put --attributes 'key1=1;key2=abc' #...
  1. Try to search with filters
frostfs-cli --config TemporaryDir/user-0x620e31e09b1e2-config.yml object search --rpc-endpoint '10.78.130.98:8080' --cid '7TR38YhFnu13Wx6Gn57iyEUd112pYfbvB8KaB6UHeNsf' --filters 'key1 EQ 1' --filters 'key2 EQ abc' --filters 'common_key EQ common_value' --root --timeout '100s'

Context

The regression is probably caused by the refactoring in #1323

Regression

Yes

Your Environment

  • Cluster
<!-- Provide a general summary of the issue in the Title above --> ## Expected Behavior `Search` with attribute filters works correctly in EC-container and shows OID ## Current Behavior `Search` for *simple* objects by attibute filters shows no result ## Possible Solution Fix the metabase ## Steps to Reproduce (for bugs) Object: `simple` 1. Create container with `EC`-policy 2. Put a **simple** object with a few attributes ```bash frostfs-cli object put --attributes 'key1=1;key2=abc' #... ``` 3. Try to search with filters ```bash frostfs-cli --config TemporaryDir/user-0x620e31e09b1e2-config.yml object search --rpc-endpoint '10.78.130.98:8080' --cid '7TR38YhFnu13Wx6Gn57iyEUd112pYfbvB8KaB6UHeNsf' --filters 'key1 EQ 1' --filters 'key2 EQ abc' --filters 'common_key EQ common_value' --root --timeout '100s' ``` ## Context The regression is *probably* caused by the refactoring in [#1323](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1323) ## Regression Yes ## Your Environment - Cluster
aarifullin added the
bug
triage
labels 2024-09-02 09:30:32 +00:00
fyrchik added the
frostfs-node
label 2024-09-02 09:52:24 +00:00

@aarifullin to specify user attributes on put you need to use , separator

frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid DRVLMcYp669Hh2bU9Dn9eb8F1ZUKxzdtiNXvcD98dW3 --file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc'

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid DRVLMcYp669Hh2bU9Dn9eb8F1ZUKxzdtiNXvcD98dW3 --filters 'key1 EQ 1'
Found 3 objects.
5UpWFYw2CT26TTgHTmGrbjaroTa25aE8oe18vMPFZyB5
GRDnGeVPzg4JUKSPRaXuPrbUQGRnXYVQMwjAsuw2oJqu
HmepLtxhSVqo5tZAqMdc3LgxuTu8xv9PjFXkScbzbVre

The real bug is that for EC objects we need to return root object ID but not chunks object IDs.

@aarifullin to specify user attributes on put you need to use `,` separator ``` frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid DRVLMcYp669Hh2bU9Dn9eb8F1ZUKxzdtiNXvcD98dW3 --file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc' frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid DRVLMcYp669Hh2bU9Dn9eb8F1ZUKxzdtiNXvcD98dW3 --filters 'key1 EQ 1' Found 3 objects. 5UpWFYw2CT26TTgHTmGrbjaroTa25aE8oe18vMPFZyB5 GRDnGeVPzg4JUKSPRaXuPrbUQGRnXYVQMwjAsuw2oJqu HmepLtxhSVqo5tZAqMdc3LgxuTu8xv9PjFXkScbzbVre ``` The real bug is that for EC objects we need to return root object ID but not chunks object IDs.
dstepanov-yadro self-assigned this 2024-09-12 06:42:00 +00:00

On support/v0.42:

frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --file 1MB.bin --attributes 'key1=1,key2=abc'
 1048576 / 1048576 [==========================================================================================================================] 100.00% 0s
[/home/dstepanov/payload/1MB.bin] Object successfully stored
  OID: FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43
  CID: 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa
  
frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --filters 'key1 EQ 1' --root
Found 1 objects.
FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --filters 'key1 EQ 1'
Found 1 objects.
FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43
On support/v0.42: ``` frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --file 1MB.bin --attributes 'key1=1,key2=abc' 1048576 / 1048576 [==========================================================================================================================] 100.00% 0s [/home/dstepanov/payload/1MB.bin] Object successfully stored OID: FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43 CID: 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --filters 'key1 EQ 1' --root Found 1 objects. FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43 frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 7Spyiu8airFMLzD6zimFzjFRvWiWXFXYKJvJho2yoFSa --filters 'key1 EQ 1' Found 1 objects. FfZahaPVYEsZWkeD36BgDqMBNGPfQ5Qj3sEDa3tqob43 ```
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1347
No description provided.