Jetty 12 upgrade PR is finally ready for review:
https://github.com/apache/pulsar/pull/25100
I started the work in April 2024 and it's been a long time in the making.

I hope that we could include this in Pulsar 4.2.0 so that we could finally make 
it happen.
This upgrade contains a breaking change in the 
org.apache.pulsar.broker.web.plugin.servlet.AdditionalServlet interface.
Before a release, it's necessary to decouple the AdditionalServlet interface 
from the ServletHolder class. A better approach would be to modify the 
interface in a way where it supports both javax.servlet (ee8) and 
jakarta.servlet (ee8, ee9) servlet APIs. This change will be made in a separate 
PR.

The Zookeeper Admin server cannot be used with Jetty 12 in the classpath. Since 
Pulsar distribution has a flat classpath, it's not possible to have Jetty 9 
available for Zookeeper. This is why the admin server of Zookeeper is disabled 
(admin.enableServer=false).
In Zookeeper there's issue https://issues.apache.org/jira/browse/ZOOKEEPER-4931 
to track Jetty upgrade. To get the Zookeeper admin server working, it's 
possible to create a shaded version of the zookeeper server jar with Jetty 9 
shaded into the new jar created in the Pulsar project. This can be handled in a 
separate PR. It would also be useful to contribute changes to Zookeeper project 
for upgrading to Jetty 12 and beyond.

BookKeeper Prometheus and Zookeeper Prometheus providers also use Jetty. The 
solution to this was to include the small modules into Pulsar under 
jetty-upgrade directory and make Jetty usage adapt to Jetty 12 APIs.

Please go and review https://github.com/apache/pulsar/pull/25100.

Thanks!

-Lari

On 2024/04/17 13:57:16 Lari Hotari wrote:
> Hi,
> 
> Pulsar Broker and Pulsar Proxy use Jetty 9.4.x. Jetty 9.4.x has reached 
> end-of-line already in June 2022. Jetty 9.4.x has been receiving security 
> updates until now although it is not officially supported anymore. This might 
> change soon. That's why we need to start preparing to upgrade to Jetty 12. 
> 
> It is recommended to skip Jetty 10 and Jetty 11 since they are also end of 
> support.
> More details about this recommendation is in this Jetty GitHub issue message 
> by the Jetty maintainer: 
> https://github.com/jetty/jetty.project/issues/11644#issuecomment-2048516903 .
> 
> Could we target Jetty 12 upgrade for the master branch so that it gets 
> included in Pulsar 3.3.x ?
> Or, do we first release 3.3.x asap and then tackle this upgrade for Pulsar 
> 3.4.x?
> 
> -Lari
> 

Reply via email to