Arsnael commented on PR #2564: URL: https://github.com/apache/james-project/pull/2564#issuecomment-2568673870
So... Locally I could still that some tests on memory jmap integration tests were indeed hanging forever. After spending some time checking the code again and how context works with Reactor, I realized that @chibenwa likely mixed up some functions. `subscriberContext` and `contextWrite` are actually doing the same thing, used for writing context and propagate it to the pipeline. However `subscriberContext` is deprecated and bound to be replaced by `contextWrite`. The `contextWrite` usage is correct, to record the IP and x-forwarded-for with the MDC. However usage of subscriberContext is wrong. What we want there is being able to log JMAP context. For this, should use `Mono.deferContextual`. And we have a function in ReactorUtils that wraps up the log statement in a `Mono.deferContextual` called `logAsMono` (which is calling logWithContext) So I believe wrapping the AuditTrail in a logAsMono call is the right move here. Locally tests are passing now. Let's see let me know if I misunderstood something though. -- 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: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org