11use crate :: progress:: frontier:: { AntichainRef , MutableAntichain } ;
22use crate :: progress:: Timestamp ;
33use crate :: dataflow:: operators:: Capability ;
4- use crate :: logging:: TimelyLogger as Logger ;
54
65/// Tracks requests for notification and delivers available notifications.
76///
@@ -18,7 +17,6 @@ use crate::logging::TimelyLogger as Logger;
1817pub struct Notificator < ' a , T : Timestamp > {
1918 frontiers : & ' a [ & ' a MutableAntichain < T > ] ,
2019 inner : & ' a mut FrontierNotificator < T > ,
21- logging : & ' a Option < Logger > ,
2220}
2321
2422impl < ' a , T : Timestamp > Notificator < ' a , T > {
@@ -28,14 +26,13 @@ impl<'a, T: Timestamp> Notificator<'a, T> {
2826 pub fn new (
2927 frontiers : & ' a [ & ' a MutableAntichain < T > ] ,
3028 inner : & ' a mut FrontierNotificator < T > ,
31- logging : & ' a Option < Logger > ) -> Self {
29+ ) -> Self {
3230
3331 inner. make_available ( frontiers) ;
3432
3533 Notificator {
3634 frontiers,
3735 inner,
38- logging,
3936 }
4037 }
4138
@@ -82,9 +79,7 @@ impl<'a, T: Timestamp> Notificator<'a, T> {
8279 #[ inline]
8380 pub fn for_each < F : FnMut ( Capability < T > , u64 , & mut Notificator < T > ) > ( & mut self , mut logic : F ) {
8481 while let Some ( ( cap, count) ) = self . next ( ) {
85- self . logging . as_ref ( ) . map ( |l| l. log ( crate :: logging:: GuardedProgressEvent { is_start : true } ) ) ;
8682 logic ( cap, count, self ) ;
87- self . logging . as_ref ( ) . map ( |l| l. log ( crate :: logging:: GuardedProgressEvent { is_start : false } ) ) ;
8883 }
8984 }
9085}
@@ -117,8 +112,6 @@ fn notificator_delivers_notifications_in_topo_order() {
117112
118113 let root_capability = Capability :: new ( Product :: new ( 0 , 0 ) , Rc :: new ( RefCell :: new ( ChangeBatch :: new ( ) ) ) ) ;
119114
120- let logging = None ; //::logging::new_inactive_logger();
121-
122115 // notificator.update_frontier_from_cm(&mut vec![ChangeBatch::new_from(ts_from_tuple((0, 0)), 1)]);
123116 let times = [
124117 Product :: new ( 3 , 5 ) ,
@@ -136,14 +129,14 @@ fn notificator_delivers_notifications_in_topo_order() {
136129 let mut frontier_notificator = FrontierNotificator :: from ( times. iter ( ) . map ( |t| root_capability. delayed ( t) ) ) ;
137130
138131 // the frontier is initially (0,0), and so we should deliver no notifications.
139- assert ! ( frontier_notificator. monotonic( & [ & frontier] , & logging ) . next( ) . is_none( ) ) ;
132+ assert ! ( frontier_notificator. monotonic( & [ & frontier] ) . next( ) . is_none( ) ) ;
140133
141134 // advance the frontier to [(5,7), (6,0)], opening up some notifications.
142135 frontier. update_iter ( vec ! [ ( Product :: new( 0 , 0 ) , -1 ) , ( Product :: new( 5 , 7 ) , 1 ) , ( Product :: new( 6 , 1 ) , 1 ) ] ) ;
143136
144137 {
145138 let frontiers = [ & frontier] ;
146- let mut notificator = frontier_notificator. monotonic ( & frontiers, & logging ) ;
139+ let mut notificator = frontier_notificator. monotonic ( & frontiers) ;
147140
148141 // we should deliver the following available notifications, in this order.
149142 assert_eq ! ( notificator. next( ) . unwrap( ) . 0 . time( ) , & Product :: new( 1 , 1 ) ) ;
@@ -159,7 +152,7 @@ fn notificator_delivers_notifications_in_topo_order() {
159152
160153 {
161154 let frontiers = [ & frontier] ;
162- let mut notificator = frontier_notificator. monotonic ( & frontiers, & logging ) ;
155+ let mut notificator = frontier_notificator. monotonic ( & frontiers) ;
163156
164157 // the first available notification should be (5,8). Note: before (6,0) in the total order, but not
165158 // in the partial order. We don't make the promise that we respect the total order.
@@ -380,8 +373,8 @@ impl<T: Timestamp> FrontierNotificator<T> {
380373 /// This implementation can be emulated with judicious use of `make_available` and `notify_at_frontiered`,
381374 /// in the event that `Notificator` provides too restrictive an interface.
382375 #[ inline]
383- pub fn monotonic < ' a > ( & ' a mut self , frontiers : & ' a [ & ' a MutableAntichain < T > ] , logging : & ' a Option < Logger > ) -> Notificator < ' a , T > {
384- Notificator :: new ( frontiers, self , logging )
376+ pub fn monotonic < ' a > ( & ' a mut self , frontiers : & ' a [ & ' a MutableAntichain < T > ] ) -> Notificator < ' a , T > {
377+ Notificator :: new ( frontiers, self )
385378 }
386379
387380 /// Iterates over pending capabilities and their count. The count represents how often a
0 commit comments