[#1074] pilorama: Allow empty filenames in SortedByFilename()
Some checks failed
DCO action / DCO (pull_request) Successful in 5m8s
Vulncheck / Vulncheck (pull_request) Failing after 5m46s
Build / Build Components (1.21) (pull_request) Successful in 7m19s
Build / Build Components (1.20) (pull_request) Successful in 7m31s
Tests and linters / Staticcheck (pull_request) Successful in 10m33s
Tests and linters / Lint (pull_request) Successful in 10m55s
Tests and linters / gopls check (pull_request) Successful in 14m2s
Tests and linters / Tests (1.21) (pull_request) Successful in 16m7s
Tests and linters / Tests with -race (pull_request) Successful in 16m12s
Tests and linters / Tests (1.20) (pull_request) Successful in 16m30s
Some checks failed
DCO action / DCO (pull_request) Successful in 5m8s
Vulncheck / Vulncheck (pull_request) Failing after 5m46s
Build / Build Components (1.21) (pull_request) Successful in 7m19s
Build / Build Components (1.20) (pull_request) Successful in 7m31s
Tests and linters / Staticcheck (pull_request) Successful in 10m33s
Tests and linters / Lint (pull_request) Successful in 10m55s
Tests and linters / gopls check (pull_request) Successful in 14m2s
Tests and linters / Tests (1.21) (pull_request) Successful in 16m7s
Tests and linters / Tests with -race (pull_request) Successful in 16m12s
Tests and linters / Tests (1.20) (pull_request) Successful in 16m30s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
3d0af159da
commit
b5ee99df55
8 changed files with 53 additions and 34 deletions
|
@ -210,7 +210,7 @@ func (e *StorageEngine) TreeGetChildren(ctx context.Context, cid cidSDK.ID, tree
|
|||
}
|
||||
|
||||
// TreeSortedByFilename implements the pilorama.Forest interface.
|
||||
func (e *StorageEngine) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.Node, last string, count int) ([]pilorama.NodeInfo, string, error) {
|
||||
func (e *StorageEngine) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, treeID string, nodeID pilorama.Node, last *string, count int) ([]pilorama.NodeInfo, *string, error) {
|
||||
ctx, span := tracing.StartSpanFromContext(ctx, "StorageEngine.TreeSortedByFilename",
|
||||
trace.WithAttributes(
|
||||
attribute.String("container_id", cid.EncodeToString()),
|
||||
|
@ -222,7 +222,7 @@ func (e *StorageEngine) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID,
|
|||
|
||||
var err error
|
||||
var nodes []pilorama.NodeInfo
|
||||
var cursor string
|
||||
var cursor *string
|
||||
for _, sh := range e.sortShards(cid) {
|
||||
nodes, cursor, err = sh.TreeSortedByFilename(ctx, cid, treeID, nodeID, last, count)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue