metabase: Fix EC search #1371

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/ec_search into master 2024-09-12 13:23:30 +00:00

Closes #1347

Before fix:

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

After fix:

frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P --file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc'
 1048576 / 1048576 [=============================================================================================================] 100.00% 0s
[/home/dstepanov/payload/1MB.bin] Object successfully stored
  OID: 8Tpn833R3c7i5gn2EFQzFjhncxKEDfMfjfpoAtQ9WGUo
  CID: 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P
  
frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P --filters 'key1 EQ 1'
Found 1 objects.
8Tpn833R3c7i5gn2EFQzFjhncxKEDfMfjfpoAtQ9WGUo
Closes #1347 Before fix: ``` 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 ``` After fix: ``` frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P --file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc' 1048576 / 1048576 [=============================================================================================================] 100.00% 0s [/home/dstepanov/payload/1MB.bin] Object successfully stored OID: 8Tpn833R3c7i5gn2EFQzFjhncxKEDfMfjfpoAtQ9WGUo CID: 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 2a3FBQu8eiZuY2CAjY1eFmRMFwzxy5i8pWDNXodCF65P --filters 'key1 EQ 1' Found 1 objects. 8Tpn833R3c7i5gn2EFQzFjhncxKEDfMfjfpoAtQ9WGUo ```
dstepanov-yadro added 1 commit 2024-09-12 07:05:31 +00:00
[#1347] metabase: Fix EC search
Some checks failed
DCO action / DCO (pull_request) Successful in 2m14s
Tests and linters / Run gofumpt (pull_request) Successful in 2m42s
Vulncheck / Vulncheck (pull_request) Successful in 2m49s
Tests and linters / Lint (pull_request) Failing after 2m57s
Build / Build Components (pull_request) Successful in 4m14s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m15s
Tests and linters / gopls check (pull_request) Successful in 4m39s
Tests and linters / Tests (pull_request) Failing after 5m3s
Tests and linters / Staticcheck (pull_request) Successful in 5m0s
Tests and linters / Tests with -race (pull_request) Failing after 5m7s
77128f1e6b
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
dstepanov-yadro force-pushed fix/ec_search from 77128f1e6b to 97b5a1e8d2 2024-09-12 07:12:00 +00:00 Compare
dstepanov-yadro changed title from metabase: Fix EC search to WIP: metabase: Fix EC search 2024-09-12 07:21:23 +00:00
Author
Member

Support/v0.42:

frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz -
-file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc'
 1048576 / 1048576 [=============================================================================================================] 100.00% 0s
[/home/dstepanov/payload/1MB.bin] Object successfully stored
  OID: BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o
  CID: 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz
Found 3 objects. <------ EC chunks
4K3hVZbH8jzkegmPQpY2Xxz142462aD66yqEncppqm3w
9ivYmHcTPY9HRTzTN4WnfkaoofWC2x7Biw3xPs19nfmx
EhVnCAM7t31f6NP7rrhf3PuVG57oit1mKEYhWkq5XQPN

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --root
Found 1 objects.
BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key1 EQ 1'
Found 1 objects.
BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key1 NE 10'
Found 1 objects.
BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key101 NOPRESENT'
Found 3 objects.  <------- EC chunks
4K3hVZbH8jzkegmPQpY2Xxz142462aD66yqEncppqm3w
9ivYmHcTPY9HRTzTN4WnfkaoofWC2x7Biw3xPs19nfmx
EhVnCAM7t31f6NP7rrhf3PuVG57oit1mKEYhWkq5XQPN
Support/v0.42: ``` frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz - -file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc' 1048576 / 1048576 [=============================================================================================================] 100.00% 0s [/home/dstepanov/payload/1MB.bin] Object successfully stored OID: BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o CID: 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz Found 3 objects. <------ EC chunks 4K3hVZbH8jzkegmPQpY2Xxz142462aD66yqEncppqm3w 9ivYmHcTPY9HRTzTN4WnfkaoofWC2x7Biw3xPs19nfmx EhVnCAM7t31f6NP7rrhf3PuVG57oit1mKEYhWkq5XQPN frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --root Found 1 objects. BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key1 EQ 1' Found 1 objects. BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key1 NE 10' Found 1 objects. BvQpoE57VTgGJFgREnuHVpFWjkddg7pR5EXy97MCuw9o frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 1Gpr74RmQgGSTY9gETF6n7qxZPn5x4e5boHMR2jjSYz --filters 'key101 NOPRESENT' Found 3 objects. <------- EC chunks 4K3hVZbH8jzkegmPQpY2Xxz142462aD66yqEncppqm3w 9ivYmHcTPY9HRTzTN4WnfkaoofWC2x7Biw3xPs19nfmx EhVnCAM7t31f6NP7rrhf3PuVG57oit1mKEYhWkq5XQPN ```
Author
Member

Current branch:

frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 
--file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc'
 1048576 / 1048576 [=============================================================================================================] 100.00% 0s
[/home/dstepanov/payload/1MB.bin] Object successfully stored
  OID: DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS
  CID: 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7

frostfs-cli object search -r 127.0.0.1:8080 --wallet /wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7
Found 3 objects. <<---- EC chunks
3SUATRYqJx9xQftqUPjaELX5WzWJEaapZFa6q5U7ePbM
4r4377rBA6BwDNcKypsUJyuXFC4gr4UtYhXracWUo9P2
DRxdZAjwdGZAeCCeV8UMRYuY6izNbvK4k2Nmdo6tmD1U

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --root
Found 1 objects.
DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key1 EQ 1'
Found 1 objects.
DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key1 NE 10'
Found 1 objects.
DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS

frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key101 NOPRESENT'
Found 3 objects.  << ----------- EC chunks
3SUATRYqJx9xQftqUPjaELX5WzWJEaapZFa6q5U7ePbM
4r4377rBA6BwDNcKypsUJyuXFC4gr4UtYhXracWUo9P2
DRxdZAjwdGZAeCCeV8UMRYuY6izNbvK4k2Nmdo6tmD1U
Current branch: ``` frostfs-cli object put -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --file /home/dstepanov/payload/1MB.bin --attributes 'key1=1,key2=abc' 1048576 / 1048576 [=============================================================================================================] 100.00% 0s [/home/dstepanov/payload/1MB.bin] Object successfully stored OID: DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS CID: 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 frostfs-cli object search -r 127.0.0.1:8080 --wallet /wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 Found 3 objects. <<---- EC chunks 3SUATRYqJx9xQftqUPjaELX5WzWJEaapZFa6q5U7ePbM 4r4377rBA6BwDNcKypsUJyuXFC4gr4UtYhXracWUo9P2 DRxdZAjwdGZAeCCeV8UMRYuY6izNbvK4k2Nmdo6tmD1U frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --root Found 1 objects. DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key1 EQ 1' Found 1 objects. DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key1 NE 10' Found 1 objects. DL9SZ3irAyTcYDoZF629xnMgQeB1HrXTF9kiwC4aJbFS frostfs-cli object search -r 127.0.0.1:8080 --wallet wallet.json -c empty_pass.yml --cid 9hKBXxv2Xg1uiaVvbhDoSgyKxUkkBknHRH7fWjvMyBm7 --filters 'key101 NOPRESENT' Found 3 objects. << ----------- EC chunks 3SUATRYqJx9xQftqUPjaELX5WzWJEaapZFa6q5U7ePbM 4r4377rBA6BwDNcKypsUJyuXFC4gr4UtYhXracWUo9P2 DRxdZAjwdGZAeCCeV8UMRYuY6izNbvK4k2Nmdo6tmD1U ```
dstepanov-yadro force-pushed fix/ec_search from 97b5a1e8d2 to 119412cdc8 2024-09-12 07:53:57 +00:00 Compare
dstepanov-yadro reviewed 2024-09-12 07:55:19 +00:00
@ -418,3 +421,3 @@
data = []byte(v)
} else {
return f[i].Operation() == objectSDK.MatchNotPresent
return result, f[i].Operation() == objectSDK.MatchNotPresent
Author
Member

Not sure that returning EC chunk in case of NOT PRESENT filter is ok, but this is behavior of support/v0.42 branch. See PR comments for example.

Not sure that returning EC chunk in case of `NOT PRESENT` filter is ok, but this is behavior of `support/v0.42` branch. See PR comments for example.
dstepanov-yadro changed title from WIP: metabase: Fix EC search to metabase: Fix EC search 2024-09-12 07:57:16 +00:00
dstepanov-yadro requested review from storage-core-committers 2024-09-12 07:57:21 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-09-12 07:57:21 +00:00
fyrchik reviewed 2024-09-12 08:55:35 +00:00
@ -387,3 +388,2 @@
return true
return result, true
}
Owner

unrelated

unrelated
Author
Member

fixed

fixed
@ -154,3 +154,3 @@
if !match {
continue // ignore objects with unmatched slow filters
}
Owner

unrelated

unrelated
Author
Member

fixed

fixed
@ -415,23 +415,26 @@ func (db *DB) matchSlowFilters(tx *bbolt.Tx, addr oid.Address, f objectSDK.Searc
default: // user attribute
v, ok := attributeValue(obj, f[i].Header())
if ok {
if ech := obj.ECHeader(); ech != nil {
Owner

Could you describe in the commit message what is the problem here?
It seems strange that if we have found an attirbute we change the address to the parent.

Could you describe in the commit message what is the problem here? It seems strange that if we _have found_ an attirbute we change the address to the parent.
Author
Member

done

done
dstepanov-yadro force-pushed fix/ec_search from 119412cdc8 to 7ebd86b751 2024-09-12 09:47:03 +00:00 Compare
aarifullin approved these changes 2024-09-12 10:08:12 +00:00
fyrchik merged commit e3764c51df into master 2024-09-12 13:23:30 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
No milestone
No project
No assignees
3 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#1371
No description provided.