Skip to content

Commit

Permalink
fix the issue that sdk would crash if there's any batch operation is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
bachue committed Jul 4, 2024
1 parent 921a54e commit 4193e6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storagev2/objects/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type (
InitWorkers uint // 初始化并发数,默认为 20
MaxWorkers uint // 最大并发数,默认为 20
MinWorkers uint // 最小并发数,默认为 1
AddWorkerInterval time.Duration // 增加并发数时间间隔
AddWorkerInterval time.Duration // 增加并发数时间间隔,默认为 1 分钟
}

concurrentBatchOpsExecutor struct {
Expand Down Expand Up @@ -630,6 +630,9 @@ func topoSort(operations []Operation) ([][]Operation, error) {
)

for operationId, operation := range operations {
if operation == nil {
continue
}
edges = append(edges, toposort.Edge{nil, operationId})

var firstKey string
Expand Down

0 comments on commit 4193e6d

Please sign in to comment.