Computation stages chained to the CompletionStage returned from `context.forwardRequest()` should be able to mutate filter state with thread safety.
The filter API already makes this guarantee about chain actions to asynchronous requests:
NOTE: Kroxylicious provides the guarantee that the chained stage is completed on the same thread as the rest of the
Filter work, so we can safely mutate Filter members without synchronising.
Given this, I believe a programmer would expect the same guarantee to be given to actions chained from the futures created by context.forwardRequest and context.forwardResponse. This would allow the programmer to mutate the filter's state safely from those actions.
Originally posted by @k-wall in https://github.com/kroxylicious/kroxylicious/issues/550#issuecomment-1679179990
Triages 2023/11/08: This needs to be further investigated and documented at the very least. Further testing probably needed.
@k-wall assigned to myself - I want to improve the problem statement.