Skip to content

Commit 11fee29

Browse files
services: change DefaultSearchBatchSize to be able to search in parallel
Revert #3670. As NeoFS searchv2 result limit is 1000, the DefaultSearchBatchSize could be little bit less to get full range with one request, even if there are duplicates. Close #3707 Signed-off-by: Ekaterina Pavlova <[email protected]>
1 parent b6cd429 commit 11fee29

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pkg/services/blockfetcher/blockfetcher.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ func (bfs *Service) streamBlockOIDs(rc io.ReadCloser, startIndex, skip int) erro
375375
// fetchOIDsBySearch fetches block OIDs from NeoFS by searching through the Block objects.
376376
func (bfs *Service) fetchOIDsBySearch() error {
377377
startIndex := bfs.heightFunc()
378-
//We need to search with EQ filter to avoid partially-completed SEARCH responses.
379378
batchSize := uint32(neofs.DefaultSearchBatchSize)
380379

381380
for {

pkg/services/helpers/neofs/blockstorage.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@ const (
2828
// DefaultKVBatchSize is a number of contract storage key-value objects to
2929
// flush to the node's DB in a batch.
3030
DefaultKVBatchSize = 1000
31-
// DefaultSearchBatchSize is a number of objects to search in a batch. We need to
32-
// search with EQ filter to avoid partially-completed SEARCH responses. If EQ search
33-
// hasn't found object the object will be uploaded one more time which may lead to
34-
// duplicating objects. We will have a risk of duplicates until #3645 is resolved
35-
// (NeoFS guarantees search results).
36-
DefaultSearchBatchSize = 1
31+
// DefaultSearchBatchSize is a number of objects to search in a batch.
32+
DefaultSearchBatchSize = 950
3733
)
3834

3935
// Constants related to NeoFS pool request timeouts.

0 commit comments

Comments
 (0)