@@ -406,15 +406,15 @@ where
406406 let store = self . store . clone ( ) ;
407407 let config = self . config . clone ( ) ;
408408
409- // Clone all the fields we need for retries
409+ // Clone all the fields we need for retries.
410410 let pipeline_id = self . pipeline_id ;
411411 let destination = self . destination . clone ( ) ;
412412 let shutdown_rx = self . shutdown_rx . clone ( ) ;
413413 let force_syncing_tables_tx = self . force_syncing_tables_tx . clone ( ) ;
414414 let run_permit = self . run_permit . clone ( ) ;
415415
416416 loop {
417- // Recreate the worker for each attempt
417+ // Recreate the worker for each attempt.
418418 let worker = TableSyncWorker {
419419 pipeline_id,
420420 config : config. clone ( ) ,
@@ -431,7 +431,7 @@ where
431431
432432 match result {
433433 Ok ( _) => {
434- // Worker completed successfully, mark as finished
434+ // Worker completed successfully, mark as finished.
435435 let mut pool = pool. lock ( ) . await ;
436436 pool. mark_worker_finished ( table_id) ;
437437
@@ -440,16 +440,16 @@ where
440440 Err ( err) => {
441441 error ! ( "table sync worker failed for table {}: {}" , table_id, err) ;
442442
443- // Convert error to table replication error to determine retry policy
443+ // Convert error to table replication error to determine retry policy.
444444 let table_error =
445445 TableReplicationError :: from_etl_error ( & config, table_id, & err) ;
446446 let retry_policy = table_error. retry_policy ( ) . clone ( ) ;
447447
448- // We lock both the pool and the table sync worker state to be consistent
448+ // We lock both the pool and the table sync worker state to be consistent.
449449 let mut pool_guard = pool. lock ( ) . await ;
450450 let mut state_guard = state. lock ( ) . await ;
451451
452- // Update the state and store with the error
452+ // Update the state and store with the error.
453453 if let Err ( err) = state_guard. set_and_store ( table_error. into ( ) , & store) . await {
454454 error ! (
455455 "failed to update table sync worker state for table {}: {}" ,
@@ -488,7 +488,7 @@ where
488488 ) ;
489489 }
490490
491- // Before rolling back, we acquire the pool lock again for consistency
491+ // Before rolling back, we acquire the pool lock again for consistency.
492492 let mut pool_guard = pool. lock ( ) . await ;
493493
494494 // After sleeping, we rollback to the previous state and retry.
0 commit comments