@@ -420,7 +420,7 @@ impl SyncStore {
420
420
}
421
421
}
422
422
423
- fn deployment_synced ( & self ) -> Result < ( ) , StoreError > {
423
+ fn deployment_synced ( & self , block_ptr : BlockPtr ) -> Result < ( ) , StoreError > {
424
424
retry:: forever ( & self . logger , "deployment_synced" , || {
425
425
let event = {
426
426
// Make sure we drop `pconn` before we call into the deployment
@@ -452,7 +452,8 @@ impl SyncStore {
452
452
}
453
453
}
454
454
455
- self . writable . deployment_synced ( & self . site . deployment ) ?;
455
+ self . writable
456
+ . deployment_synced ( & self . site . deployment , block_ptr. clone ( ) ) ?;
456
457
457
458
self . store . send_store_event ( & event)
458
459
} )
@@ -1659,7 +1660,7 @@ impl WritableStoreTrait for WritableStore {
1659
1660
is_caught_up_with_chain_head : bool ,
1660
1661
) -> Result < ( ) , StoreError > {
1661
1662
if is_caught_up_with_chain_head {
1662
- self . deployment_synced ( ) ?;
1663
+ self . deployment_synced ( block_ptr_to . clone ( ) ) ?;
1663
1664
} else {
1664
1665
self . writer . start_batching ( ) ;
1665
1666
}
@@ -1696,10 +1697,10 @@ impl WritableStoreTrait for WritableStore {
1696
1697
/// - Disable the time-to-sync metrics gathering.
1697
1698
/// - Stop batching writes.
1698
1699
/// - Promote it to 'synced' status in the DB, if that hasn't been done already.
1699
- fn deployment_synced ( & self ) -> Result < ( ) , StoreError > {
1700
+ fn deployment_synced ( & self , block_ptr : BlockPtr ) -> Result < ( ) , StoreError > {
1700
1701
self . writer . deployment_synced ( ) ;
1701
1702
if !self . is_deployment_synced . load ( Ordering :: SeqCst ) {
1702
- self . store . deployment_synced ( ) ?;
1703
+ self . store . deployment_synced ( block_ptr ) ?;
1703
1704
self . is_deployment_synced . store ( true , Ordering :: SeqCst ) ;
1704
1705
}
1705
1706
Ok ( ( ) )
0 commit comments