@@ -172,11 +172,13 @@ func (f *Finder) Run(ctx context.Context) {
172172func (f * Finder ) getTargetObjects (ctx context.Context , prefix * string ) (objects map [string ]* int64 ) {
173173
174174 destPrefix := appendPrefix (prefix , & f .cfg .DestPrefix )
175- // log.Printf("Getting target list in destination prefix /%s\n", *destPrefix)
175+ log .Printf ("Scanning in destination prefix /%s\n " , * destPrefix )
176176
177177 token := ""
178178 objects = make (map [string ]* int64 , 1 << 17 )
179179
180+ i := 0
181+ batch := 10
180182 for token != "End" {
181183 tar , err := f .desClient .ListObjects (ctx , & token , destPrefix , f .cfg .MaxKeys )
182184 if err != nil {
@@ -190,6 +192,10 @@ func (f *Finder) getTargetObjects(ctx context.Context, prefix *string) (objects
190192 srcKey := removePrefix (& obj .Key , & f .cfg .DestPrefix )
191193 objects [* srcKey ] = & obj .Size
192194 }
195+ i ++
196+ if (i % batch ) == 0 {
197+ log .Printf ("Scanned %d objects..." , i * 1000 )
198+ }
193199 }
194200 log .Printf ("Totally %d objects in destination prefix /%s\n " , len (objects ), * destPrefix )
195201 return
@@ -200,7 +206,7 @@ func (f *Finder) getTargetObjects(ctx context.Context, prefix *string) (objects
200206func (f * Finder ) compareAndSend (ctx context.Context , prefix * string , batchCh chan struct {}, msgCh chan * string , compareCh chan struct {}, wg * sync.WaitGroup ) {
201207 defer wg .Done ()
202208
203- log .Printf ("Comparing in source prefix /%s\n " , * prefix )
209+ log .Printf ("Comparing within prefix /%s\n " , * prefix )
204210 target := f .getTargetObjects (ctx , prefix )
205211
206212 token := ""
0 commit comments