@@ -1087,6 +1087,7 @@ impl Replicator {
10871087 let snapshot_notifier = self . snapshot_notifier . clone ( ) ;
10881088 let compression = self . use_compression ;
10891089 let db_path = PathBuf :: from ( self . db_path . clone ( ) ) ;
1090+ let db_name = self . db_name . clone ( ) ;
10901091 let handle = tokio:: spawn ( async move {
10911092 tracing:: trace!( "Start snapshotting generation {}" , generation) ;
10921093 let start = Instant :: now ( ) ;
@@ -1125,14 +1126,14 @@ impl Replicator {
11251126 }
11261127 let _ = snapshot_notifier. send ( Ok ( Some ( generation) ) ) ;
11271128 let elapsed = Instant :: now ( ) - start;
1128- tracing:: debug!( "Snapshot upload finished (took {:?})" , elapsed) ;
1129+ tracing:: info!( "Snapshot upload finished (took {:?})" , elapsed) ;
1130+ Self :: record_snapshot_upload_time ( & db_name, elapsed) ;
11291131 // cleanup gzip/zstd database snapshot if exists
11301132 for suffix in & [ "gz" , "zstd" ] {
11311133 let _ = tokio:: fs:: remove_file ( Self :: db_compressed_path ( & db_path, suffix) ) . await ;
11321134 }
11331135 } ) ;
11341136 let elapsed = Instant :: now ( ) - start_ts;
1135- Self :: record_snapshot_upload_time ( & self . db_name , elapsed) ;
11361137 tracing:: debug!( "Scheduled DB snapshot {} (took {:?})" , generation, elapsed) ;
11371138
11381139 Ok ( Some ( handle) )
0 commit comments