@@ -512,10 +512,10 @@ impl LambdaProcessor {
512512 if let ( Some ( id) , Some ( name) ) = ( execution_id, execution_name) {
513513 let is_new = !self . durable_id_map . contains_key ( request_id) ;
514514 if is_new {
515- if self . durable_id_order . len ( ) >= DURABLE_ID_MAP_CAPACITY {
516- if let Some ( oldest) = self . durable_id_order . pop_front ( ) {
517- self . durable_id_map . remove ( & oldest ) ;
518- }
515+ if self . durable_id_order . len ( ) >= DURABLE_ID_MAP_CAPACITY
516+ && let Some ( oldest) = self . durable_id_order . pop_front ( )
517+ {
518+ self . durable_id_map . remove ( & oldest ) ;
519519 }
520520 self . durable_id_order . push_back ( request_id. to_string ( ) ) ;
521521 }
@@ -527,7 +527,7 @@ impl LambdaProcessor {
527527 }
528528
529529 /// Moves all logs held for `request_id` into `ready_logs`, tagging each with the
530- /// durable execution context that is now known for that request_id.
530+ /// durable execution context that is now known for that ` request_id` .
531531 fn drain_held_for_request_id ( & mut self , request_id : & str ) {
532532 let Some ( held) = self . held_logs . remove ( request_id) else {
533533 return ;
@@ -552,8 +552,8 @@ impl LambdaProcessor {
552552 /// Drains every entry in `held_logs`, routing each batch according to the newly-known flag:
553553 /// - `Some(false)` → flush all held logs immediately.
554554 /// - `Some(true)` → try to extract durable context from the held logs; those whose
555- /// request_id is now in the durable ID map are flushed with tags; the
556- /// rest stay in `held_logs` until their context arrives.
555+ /// ` request_id` is now in the durable ID map are flushed with tags; the
556+ /// rest stay in `held_logs` until their context arrives.
557557 fn resolve_held_logs_on_durable_function_set ( & mut self ) {
558558 let held = std:: mem:: take ( & mut self . held_logs ) ;
559559 match self . is_durable_function {
@@ -608,12 +608,12 @@ impl LambdaProcessor {
608608 /// Queues a log that has already had processing rules applied.
609609 ///
610610 /// Routing depends on `is_durable_function`:
611- /// - `None` → stash in `held_logs[request_id]`; logs without a request_id are
612- /// flushed immediately since they cannot carry durable context.
611+ /// - `None` → stash in `held_logs[request_id]`; logs without a ` request_id` are
612+ /// flushed immediately since they cannot carry durable context.
613613 /// - `Some(false)` → serialize and push straight to `ready_logs`.
614614 /// - `Some(true)` → try to update `durable_id_map` from the log; if a new entry was
615- /// added, drain `held_logs` for that request_id; then flush this log if
616- /// its request_id is in the map, otherwise stash it in `held_logs`.
615+ /// added, drain `held_logs` for that ` request_id` ; then flush this log if
616+ /// its ` request_id` is in the map, otherwise stash it in `held_logs`.
617617 fn queue_log_after_rules ( & mut self , mut log : IntakeLog ) {
618618 match self . is_durable_function {
619619 None => {
@@ -639,11 +639,11 @@ impl LambdaProcessor {
639639 }
640640 }
641641 Some ( true ) => {
642- if let Some ( rid) = log. message . lambda . request_id . clone ( ) {
643- if self . try_update_durable_map ( & rid, & log. message . message ) {
644- // New durable context just discovered — drain previously held logs.
645- self . drain_held_for_request_id ( & rid ) ;
646- }
642+ if let Some ( rid) = log. message . lambda . request_id . clone ( )
643+ && self . try_update_durable_map ( & rid, & log. message . message )
644+ {
645+ // New durable context just discovered — drain previously held logs.
646+ self . drain_held_for_request_id ( & rid ) ;
647647 }
648648
649649 // Flush this log if its request_id now has durable context; otherwise hold.
0 commit comments