On Tue, May 30, 2023 at 1:27 PM Mark Thomas <ma...@apache.org> wrote:
>
> On 29/05/2023 08:36, Mark Thomas wrote:
> > On 26/05/2023 09:56, Rémy Maucherat wrote:
> >> Hi,
> >>
> >> After looking at BZ 66513, reading things online, the javadoc with its
> >> heavy handed usage warnings, code of PersistentValve and tracing back
> >> all the calls in the PersistentManager itself, my conclusion is that
> >> the functionality provided by that valve is probably not doable
> >> without significant compromises that would likely break most of its
> >> usefulness. This seems to be a core design issue basically, or at
> >> least this is a far more complex problem than what can be achieved
> >> using a quick hack.
> >
> > I'd like to see if we can find an acceptable hack to enforce the no more
> > than one concurrent request per session rule. I have some ideas but need
> > to think them through to find all the edge cases I have missed.
> >
> >> As a result, I would be inclined to propose dropping PersistentValve
> >> in Tomcat 11, and deprecating it in the other branches.
> >
> > Given bug 66513 it seems that some folks do find it useful. If there is
> > a set of users for which the Valve is useful then I'd prefer to keep it
> > if we can (with clearly documented constraints).
> >
> > If t just isn't possible then removal / deprecation seems reasonable.
>
> How about this?
>
> https://github.com/apache/tomcat/pull/623
>
> I think this is an approach that could work. It addresses the
> thread-safety concerns with the first couple of attempts I had at
> solving this.
>
> If folks think that a) I haven't missed any other thread-safety issues
> and b) enforcing max one request per session is a viable approach then
> I'm happy to do the work to clean this up (docs, tests, etc.)

Ok. I proposed the removal based on "It is intended to be used with
non-sticky load-balancers" from the javadoc. I think the clustering
and stickness have to be used instead of this valve, to comply with
all reasonable concurrency requirements from the container and
application in that use case. Basically the BZ can be fixed only if
there's one Tomcat. I understand this valve is in use since we got the
BZ, but given everything I don't understand how it is useful, I
considered users should either stop using it or move to session
clustering.

Rémy

> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to