File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ use bd_client_stats_store::{Counter, Scope};
3737use bd_log_primitives:: LogFields ;
3838use bd_resilient_kv:: SnapshotFilename ;
3939use bd_state:: { RetentionHandle , RetentionRegistry } ;
40- use bd_time:: TimeProvider ;
40+ use bd_time:: { OffsetDateTimeExt , TimeProvider } ;
4141use std:: fs:: File ;
4242use std:: path:: { Path , PathBuf } ;
4343use std:: sync:: Arc ;
@@ -451,7 +451,7 @@ impl StateUploadWorker {
451451
452452 let now_micros = {
453453 let now = self . time_provider . now ( ) ;
454- now. unix_timestamp ( ) . cast_unsigned ( ) * 1_000_000 + u64 :: from ( now . microsecond ( ) )
454+ now. unix_timestamp_micros ( ) . cast_unsigned ( )
455455 } ;
456456 let last_creation = self . last_snapshot_creation_micros . load ( Ordering :: Relaxed ) ;
457457 if last_creation > 0
Original file line number Diff line number Diff line change @@ -542,8 +542,7 @@ impl Store {
542542 }
543543
544544 fn record_change ( & self , timestamp : OffsetDateTime ) {
545- let micros =
546- timestamp. unix_timestamp ( ) . cast_unsigned ( ) * 1_000_000 + u64:: from ( timestamp. microsecond ( ) ) ;
545+ let micros = timestamp. unix_timestamp_micros ( ) . cast_unsigned ( ) ;
547546 self
548547 . last_change_micros
549548 . fetch_max ( micros, std:: sync:: atomic:: Ordering :: Relaxed ) ;
You can’t perform that action at this time.
0 commit comments