He-Pin opened a new issue, #3103:
URL: https://github.com/apache/pekko/issues/3103

   ### Motivation
   
   `MapAsync` and `MapAsyncUnordered` support supervision strategy (decider) 
for failed futures. When the decider returns `Resume` or `Restart`, the failed 
element is silently skipped with no log output. This makes debugging production 
issues difficult — users cannot see which elements were dropped or what 
exceptions occurred.
   
   ### Current behavior
   
   **MapAsync** (`Ops.scala:1304-1312`):
   ```scala
   case Failure(ex) =>
     holder.supervisionDirectiveFor(decider, ex) match {
       case Supervision.Stop => failStage(ex)
       case _                => pushNextIfPossible()  // No logging
     }
   ```
   
   **MapAsyncUnordered** (`Ops.scala:1442-1446`):
   ```scala
   case Failure(ex) =>
     if (decider(ex) == Supervision.Stop) failStage(ex)
     else if (isCompleted) completeStage()  // No logging
     else if (!hasBeenPulled(in)) tryPull(in)
   ```
   
   Same pattern in synchronous exception handler (`Ops.scala:1349-1352`).
   
   ### Proposed fix
   
   1. Mix in `StageLogging` trait for both `MapAsync` and `MapAsyncUnordered`
   2. Before applying supervision directive, log the exception at the 
configured error level
   3. Respect the existing `stage-errors-default-log-level` configuration from 
[#2805](https://github.com/apache/pekko/pull/2805)
   4. Add tests verifying log output on Resume/Restart
   
   ### References
   
   - Inspired by Akka.NET 
[#6884](https://github.com/akkadotnet/akka.net/pull/6884)
   - Complements Pekko's fine-grained error logging control 
[#2805](https://github.com/apache/pekko/pull/2805)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to