From 2f4c462ebb5c97b6f00676850f6c564d7407c0f6 Mon Sep 17 00:00:00 2001 From: Hitenjain14 Date: Fri, 29 Dec 2023 23:02:45 +0530 Subject: [PATCH] set multi op batch size --- cmd/migrate.go | 2 +- dstorage/dstorage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index c3f31c9..4ad0f08 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -70,7 +70,7 @@ func init() { migrateCmd.Flags().StringVar(&olderThanStr, "older-than", "", "eg; 7d10h --> migrate objects that is older than 7 days 10 hours") migrateCmd.Flags().Int64Var(&chunkSize, "chunk-size", 50*1024*1024, "chunk size in bytes") migrateCmd.Flags().IntVar(&chunkNumber, "chunk-number", 250, "number of chunks to upload") - migrateCmd.Flags().IntVar(&batchSize, "batch-size", 30, "number of files to upload in a batch") + migrateCmd.Flags().IntVar(&batchSize, "batch-size", 20, "number of files to upload in a batch") } diff --git a/dstorage/dstorage.go b/dstorage/dstorage.go index 7406c7c..c0ec2a8 100644 --- a/dstorage/dstorage.go +++ b/dstorage/dstorage.go @@ -174,7 +174,7 @@ func (d *DStorageService) GetTotalSpace() int64 { func GetDStorageService(allocationID, migrateTo, duplicateSuffix, workDir string, encrypt bool, chunkNumber, batchSize int) (*DStorageService, error) { allocation, err := sdk.GetAllocation(allocationID) - sdk.BatchSize = batchSize + sdk.MultiOpBatchSize = batchSize if err != nil { return nil, err }