From ed1fabe19bd23e1106390daff70ce0184ba2c4fa Mon Sep 17 00:00:00 2001 From: Hitenjain14 Date: Sun, 12 Nov 2023 21:48:14 +0530 Subject: [PATCH 1/2] fix chunk number --- cmd/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index 7701544..c3f31c9 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -69,7 +69,7 @@ func init() { migrateCmd.Flags().StringVar(&newerThanStr, "newer-than", "", "eg; 7d10h --> migrate objects that is newer than 7 days 10 hours") 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", 1000, "number of chunks to upload") + 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") } From 03c3d6f213b9cd15fbe95747ecb74c27fdcb2151 Mon Sep 17 00:00:00 2001 From: Hitenjain14 Date: Sun, 12 Nov 2023 21:56:19 +0530 Subject: [PATCH 2/2] set chunk size --- migration/migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migrate.go b/migration/migrate.go index 38f0730..d1dc131 100644 --- a/migration/migrate.go +++ b/migration/migrate.go @@ -129,7 +129,7 @@ func InitMigration(mConfig *MigrationConfig) error { zlogger.Logger.Error(err) return err } - + mConfig.ChunkSize = dStorageService.GetChunkWriteSize() zlogger.Logger.Info("Getting aws storage service") awsStorageService, err := s3.GetAwsClient( mConfig.Bucket,