@@ -323,6 +323,11 @@ fn main() -> Result<()> {
323
323
None => Err ( anyhow ! ( "Data source not found" ) ) ?,
324
324
} ;
325
325
326
+ let points_per_request = match std:: env:: var ( "POINTS_PER_REQUEST" ) {
327
+ Ok ( v) => v. parse :: < usize > ( ) ?,
328
+ Err ( _) => 256 ,
329
+ } ;
330
+
326
331
let qdrant_client = qdrant_clients. main_client ( & ds. config ( ) . qdrant_config ) ;
327
332
328
333
// Delete collection on shadow_write_cluster.
@@ -332,15 +337,21 @@ fn main() -> Result<()> {
332
337
None => Err ( anyhow ! ( "No shadow write cluster to migrate to" ) ) ?,
333
338
} ;
334
339
340
+ utils:: info ( & format ! (
341
+ "Migrating points: points_per_request={}" ,
342
+ points_per_request
343
+ ) ) ;
344
+
335
345
let mut page_offset: Option < PointId > = None ;
336
346
let mut total: usize = 0 ;
337
347
loop {
348
+ let now = utils:: now ( ) ;
338
349
let scroll_results = qdrant_client
339
350
. scroll ( & ScrollPoints {
340
351
collection_name : ds. qdrant_collection ( ) ,
341
352
with_vectors : Some ( true . into ( ) ) ,
342
353
with_payload : Some ( true . into ( ) ) ,
343
- limit : Some ( 256 ) ,
354
+ limit : Some ( points_per_request as u32 ) ,
344
355
offset : page_offset,
345
356
..Default :: default ( )
346
357
} )
@@ -365,7 +376,12 @@ fn main() -> Result<()> {
365
376
. await ?;
366
377
367
378
total += count;
368
- utils:: info ( & format ! ( "Migrated points: count={} total={}" , count, total) ) ;
379
+ utils:: info ( & format ! (
380
+ "Migrated points: count={} total={} latency_ms={}" ,
381
+ count,
382
+ total,
383
+ utils:: now( ) - now
384
+ ) ) ;
369
385
370
386
page_offset = scroll_results. next_page_offset ;
371
387
if page_offset. is_none ( ) {
0 commit comments