diff --git a/0002-resolve-cve-2023-32697.patch b/0002-resolve-cve-2023-32697.patch deleted file mode 100644 index fc4ec68dac51cd4561ab586deea99d4762a0cef0..0000000000000000000000000000000000000000 --- a/0002-resolve-cve-2023-32697.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: pom.xml -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/pom.xml b/pom.xml ---- a/pom.xml (revision c7cbce922f07ac80a08f58eb04786e2e91fc52b2) -+++ b/pom.xml (date 1692695814239) -@@ -149,7 +149,7 @@ - 2.10.5 - 2.5.0 - 5.1.0 -- 3.8.11.2 -+ 3.42.0.0 - 8.0.11 - 42.4.1 - 0.3.2 diff --git a/0003-CVE-2023-2976.patch b/0003-CVE-2023-2976.patch deleted file mode 100644 index e5170d283c9810e197dc2be5a78d672d7e308672..0000000000000000000000000000000000000000 --- a/0003-CVE-2023-2976.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/buildtools/pom.xml b/buildtools/pom.xml -index 0197f03326..5115700da7 100644 ---- a/buildtools/pom.xml -+++ b/buildtools/pom.xml -@@ -47,7 +47,7 @@ - 8.37 - 3.1.2 - 4.2.3 -- 31.0.1-jre -+ 32.0.0-jre - 1.10.12 - 1.32 - -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 1ce81c7344..7d2433a2db 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -328,7 +328,7 @@ The Apache Software License, Version 2.0 - - com.google.code.gson-gson-2.8.9.jar - - io.gsonfire-gson-fire-1.8.5.jar - * Guava -- - com.google.guava-guava-31.0.1-jre.jar -+ - com.google.guava-guava-32.0.0-jre.jar - - com.google.guava-failureaccess-1.0.1.jar - - com.google.guava-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - * J2ObjC Annotations -- com.google.j2objc-j2objc-annotations-1.3.jar -@@ -559,7 +559,7 @@ MIT License - - org.slf4j-slf4j-api-1.7.32.jar - - org.slf4j-jcl-over-slf4j-1.7.32.jar - * The Checker Framework -- - org.checkerframework-checker-qual-3.12.0.jar -+ - org.checkerframework-checker-qual-3.33.0.jar - - Protocol Buffers License - * Protocol Buffers -diff --git a/pom.xml b/pom.xml -index 69adebd4df..904bd5ac28 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -168,7 +168,7 @@ flexible messaging model and an intuitive client API. - 0.11.1 - 0.28.0 - 2.4.9 -- 31.0.1-jre -+ 32.0.0-jre - 1.0 - 0.14.0 - 7.0.1 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 4087b9e83e..a5923972ee 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -221,7 +221,7 @@ The Apache Software License, Version 2.0 - - jackson-module-jaxb-annotations-2.13.4.jar - - jackson-module-jsonSchema-2.13.4.jar - * Guava -- - guava-31.0.1-jre.jar -+ - guava-32.0.0-jre.jar - - listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - - failureaccess-1.0.1.jar - * Google Guice -@@ -515,7 +515,7 @@ MIT License - * JUL to SLF4J Bridge - - jul-to-slf4j-1.7.32.jar - * Checker Qual -- - checker-qual-3.12.0.jar -+ - checker-qual-3.33.0.jar - * Annotations - - animal-sniffer-annotations-1.19.jar - - annotations-4.1.1.4.jar -diff --git a/pulsar-sql/presto-distribution/pom.xml b/pulsar-sql/presto-distribution/pom.xml -index cbeb5b7096..990c806e44 100644 ---- a/pulsar-sql/presto-distribution/pom.xml -+++ b/pulsar-sql/presto-distribution/pom.xml -@@ -39,7 +39,7 @@ - 2.6 - 0.0.12 - 3.0.5 -- 31.0.1-jre -+ 32.0.0-jre - 2.12.1 - 2.5.1 - 4.0.1 diff --git a/0004-netty-to-4.1.89.patch b/0004-netty-to-4.1.89.patch deleted file mode 100644 index 2d6b6b29e4ae9358151e6f2f93864c8400f512d4..0000000000000000000000000000000000000000 --- a/0004-netty-to-4.1.89.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/buildtools/pom.xml b/buildtools/pom.xml -index 0197f03326..1a805dee6c 100644 ---- a/buildtools/pom.xml -+++ b/buildtools/pom.xml -@@ -131,7 +131,7 @@ - - io.netty - netty-common -- 4.1.86.Final -+ 4.1.89.Final - test - - -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 1ce81c7344..adda602fd3 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -352,24 +352,27 @@ The Apache Software License, Version 2.0 - - org.apache.commons-commons-compress-1.21.jar - - org.apache.commons-commons-lang3-3.11.jar - * Netty -- - io.netty-netty-buffer-4.1.87.Final.jar -- - io.netty-netty-codec-4.1.87.Final.jar -- - io.netty-netty-codec-dns-4.1.87.Final.jar -- - io.netty-netty-codec-http-4.1.87.Final.jar -- - io.netty-netty-codec-http2-4.1.87.Final.jar -- - io.netty-netty-codec-socks-4.1.87.Final.jar -- - io.netty-netty-codec-haproxy-4.1.87.Final.jar -- - io.netty-netty-common-4.1.87.Final.jar -- - io.netty-netty-handler-4.1.87.Final.jar -- - io.netty-netty-handler-proxy-4.1.87.Final.jar -- - io.netty-netty-resolver-4.1.87.Final.jar -- - io.netty-netty-resolver-dns-4.1.87.Final.jar -- - io.netty-netty-transport-4.1.87.Final.jar -- - io.netty-netty-transport-classes-epoll-4.1.87.Final.jar -- - io.netty-netty-transport-native-epoll-4.1.87.Final-linux-x86_64.jar -- - io.netty-netty-transport-native-epoll-4.1.87.Final.jar -- - io.netty-netty-transport-native-unix-common-4.1.87.Final.jar -- - io.netty-netty-transport-native-unix-common-4.1.87.Final-linux-x86_64.jar -+ - io.netty-netty-buffer-4.1.89.Final.jar -+ - io.netty-netty-codec-4.1.89.Final.jar -+ - io.netty-netty-codec-dns-4.1.89.Final.jar -+ - io.netty-netty-codec-http-4.1.89.Final.jar -+ - io.netty-netty-codec-http2-4.1.89.Final.jar -+ - io.netty-netty-codec-socks-4.1.89.Final.jar -+ - io.netty-netty-codec-haproxy-4.1.89.Final.jar -+ - io.netty-netty-common-4.1.89.Final.jar -+ - io.netty-netty-handler-4.1.89.Final.jar -+ - io.netty-netty-handler-proxy-4.1.89.Final.jar -+ - io.netty-netty-resolver-4.1.89.Final.jar -+ - io.netty-netty-resolver-dns-4.1.89.Final.jar -+ - io.netty-netty-resolver-dns-classes-macos-4.1.89.Final.jar -+ - io.netty-netty-resolver-dns-native-macos-4.1.89.Final-osx-aarch_64.jar -+ - io.netty-netty-resolver-dns-native-macos-4.1.89.Final-osx-x86_64.jar -+ - io.netty-netty-transport-4.1.89.Final.jar -+ - io.netty-netty-transport-classes-epoll-4.1.89.Final.jar -+ - io.netty-netty-transport-native-epoll-4.1.89.Final-linux-x86_64.jar -+ - io.netty-netty-transport-native-epoll-4.1.89.Final.jar -+ - io.netty-netty-transport-native-unix-common-4.1.89.Final.jar -+ - io.netty-netty-transport-native-unix-common-4.1.89.Final-linux-x86_64.jar - - io.netty-netty-tcnative-boringssl-static-2.0.56.Final.jar - - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar - - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar -diff --git a/pom.xml b/pom.xml -index 69adebd4df..c6d8955faa 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -110,8 +110,8 @@ flexible messaging model and an intuitive client API. - 1.1.7 - 3.2.5 - 5.1.0 -- 4.1.87.Final -- 0.0.17.Final -+ 4.1.89.Final -+ 0.0.18.Final - 9.4.48.v20220622 - 2.5.2 - 2.34 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 4087b9e83e..a2ab984cd4 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -232,18 +232,18 @@ The Apache Software License, Version 2.0 - - commons-lang3-3.11.jar - * Netty - - netty-3.10.6.Final.jar -- - netty-buffer-4.1.87.Final.jar -- - netty-codec-4.1.87.Final.jar -- - netty-codec-dns-4.1.87.Final.jar -- - netty-codec-http-4.1.87.Final.jar -- - netty-codec-haproxy-4.1.87.Final.jar -- - netty-codec-socks-4.1.87.Final.jar -- - netty-handler-proxy-4.1.87.Final.jar -- - netty-common-4.1.87.Final.jar -- - netty-handler-4.1.87.Final.jar -+ - netty-buffer-4.1.89.Final.jar -+ - netty-codec-4.1.89.Final.jar -+ - netty-codec-dns-4.1.89.Final.jar -+ - netty-codec-http-4.1.89.Final.jar -+ - netty-codec-haproxy-4.1.89.Final.jar -+ - netty-codec-socks-4.1.89.Final.jar -+ - netty-handler-proxy-4.1.89.Final.jar -+ - netty-common-4.1.89.Final.jar -+ - netty-handler-4.1.89.Final.jar - - netty-reactive-streams-2.0.6.jar -- - netty-resolver-4.1.87.Final.jar -- - netty-resolver-dns-4.1.87.Final.jar -+ - netty-resolver-4.1.89.Final.jar -+ - netty-resolver-dns-4.1.89.Final.jar - - netty-tcnative-boringssl-static-2.0.56.Final.jar - - netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar - - netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar -@@ -251,11 +251,11 @@ The Apache Software License, Version 2.0 - - netty-tcnative-boringssl-static-2.0.56.Final-osx-x86_64.jar - - netty-tcnative-boringssl-static-2.0.56.Final-windows-x86_64.jar - - netty-tcnative-classes-2.0.56.Final.jar -- - netty-transport-4.1.87.Final.jar -- - netty-transport-classes-epoll-4.1.87.Final.jar -- - netty-transport-native-epoll-4.1.87.Final-linux-x86_64.jar -- - netty-transport-native-unix-common-4.1.87.Final.jar -- - netty-transport-native-unix-common-4.1.87.Final-linux-x86_64.jar -+ - netty-transport-4.1.89.Final.jar -+ - netty-transport-classes-epoll-4.1.89.Final.jar -+ - netty-transport-native-epoll-4.1.89.Final-linux-x86_64.jar -+ - netty-transport-native-unix-common-4.1.89.Final.jar -+ - netty-transport-native-unix-common-4.1.89.Final-linux-x86_64.jar - - netty-codec-http2-4.1.87.Final.jar - * GRPC - - grpc-api-1.45.1.jar diff --git a/0005-cve-2023-34455.patch b/0005-cve-2023-34455.patch deleted file mode 100644 index d068c565440c128883d0a42dfd19f76736154d76..0000000000000000000000000000000000000000 --- a/0005-cve-2023-34455.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 9b4a65d400..885ab204a5 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -529,7 +529,7 @@ The Apache Software License, Version 2.0 - - org.apache.zookeeper-zookeeper-jute-3.6.3.jar - - org.apache.zookeeper-zookeeper-prometheus-metrics-3.6.3.jar - * Snappy Java -- - org.xerial.snappy-snappy-java-1.1.7.jar -+ - org.xerial.snappy-snappy-java-1.1.10.1.jar - * Google HTTP Client - - com.google.http-client-google-http-client-jackson2-1.41.0.jar - - com.google.http-client-google-http-client-gson-1.41.0.jar -diff --git a/pom.xml b/pom.xml -index 3fa8222bc5..fa629aeb7c 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -107,7 +107,7 @@ flexible messaging model and an intuitive client API. - 4.14.7 - 3.6.3 - 1.5.0 -- 1.1.7 -+ 1.1.10.1 - 3.2.5 - 5.1.0 - 4.1.89.Final -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 6fa2572afb..ccfbd70877 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -457,7 +457,7 @@ The Apache Software License, Version 2.0 - * GSON - - gson-2.8.9.jar - * Snappy -- - snappy-java-1.1.7.jar -+ - snappy-java-1.1.10.1.jar - * Jackson - - jackson-module-parameter-names-2.13.4.jar - * Java Assist diff --git a/0006-fix-memory-leak.patch b/0006-fix-memory-leak.patch deleted file mode 100644 index 0d04bcd9ea8733398de418929d0f6c54fbfc41f9..0000000000000000000000000000000000000000 --- a/0006-fix-memory-leak.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff --git a/buildtools/pom.xml b/buildtools/pom.xml -index f095709d2c..9dbbba70f9 100644 ---- a/buildtools/pom.xml -+++ b/buildtools/pom.xml -@@ -131,7 +131,7 @@ - - io.netty - netty-common -- 4.1.89.Final -+ 4.1.93.Final - test - - -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 885ab204a5..a413803445 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -352,34 +352,34 @@ The Apache Software License, Version 2.0 - - org.apache.commons-commons-compress-1.21.jar - - org.apache.commons-commons-lang3-3.11.jar - * Netty -- - io.netty-netty-buffer-4.1.89.Final.jar -- - io.netty-netty-codec-4.1.89.Final.jar -- - io.netty-netty-codec-dns-4.1.89.Final.jar -- - io.netty-netty-codec-http-4.1.89.Final.jar -- - io.netty-netty-codec-http2-4.1.89.Final.jar -- - io.netty-netty-codec-socks-4.1.89.Final.jar -- - io.netty-netty-codec-haproxy-4.1.89.Final.jar -- - io.netty-netty-common-4.1.89.Final.jar -- - io.netty-netty-handler-4.1.89.Final.jar -- - io.netty-netty-handler-proxy-4.1.89.Final.jar -- - io.netty-netty-resolver-4.1.89.Final.jar -- - io.netty-netty-resolver-dns-4.1.89.Final.jar -- - io.netty-netty-resolver-dns-classes-macos-4.1.89.Final.jar -- - io.netty-netty-resolver-dns-native-macos-4.1.89.Final-osx-aarch_64.jar -- - io.netty-netty-resolver-dns-native-macos-4.1.89.Final-osx-x86_64.jar -- - io.netty-netty-transport-4.1.89.Final.jar -- - io.netty-netty-transport-classes-epoll-4.1.89.Final.jar -- - io.netty-netty-transport-native-epoll-4.1.89.Final-linux-x86_64.jar -- - io.netty-netty-transport-native-epoll-4.1.89.Final.jar -- - io.netty-netty-transport-native-unix-common-4.1.89.Final.jar -- - io.netty-netty-transport-native-unix-common-4.1.89.Final-linux-x86_64.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-osx-aarch_64.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-osx-x86_64.jar -- - io.netty-netty-tcnative-boringssl-static-2.0.56.Final-windows-x86_64.jar -- - io.netty-netty-tcnative-classes-2.0.56.Final.jar -+ - io.netty-netty-buffer-4.1.93.Final.jar -+ - io.netty-netty-codec-4.1.93.Final.jar -+ - io.netty-netty-codec-dns-4.1.93.Final.jar -+ - io.netty-netty-codec-http-4.1.93.Final.jar -+ - io.netty-netty-codec-http2-4.1.93.Final.jar -+ - io.netty-netty-codec-socks-4.1.93.Final.jar -+ - io.netty-netty-codec-haproxy-4.1.93.Final.jar -+ - io.netty-netty-common-4.1.93.Final.jar -+ - io.netty-netty-handler-4.1.93.Final.jar -+ - io.netty-netty-handler-proxy-4.1.93.Final.jar -+ - io.netty-netty-resolver-4.1.93.Final.jar -+ - io.netty-netty-resolver-dns-4.1.93.Final.jar -+ - io.netty-netty-resolver-dns-classes-macos-4.1.93.Final.jar -+ - io.netty-netty-resolver-dns-native-macos-4.1.93.Final-osx-aarch_64.jar -+ - io.netty-netty-resolver-dns-native-macos-4.1.93.Final-osx-x86_64.jar -+ - io.netty-netty-transport-4.1.93.Final.jar -+ - io.netty-netty-transport-classes-epoll-4.1.93.Final.jar -+ - io.netty-netty-transport-native-epoll-4.1.93.Final-linux-x86_64.jar -+ - io.netty-netty-transport-native-epoll-4.1.93.Final.jar -+ - io.netty-netty-transport-native-unix-common-4.1.93.Final.jar -+ - io.netty-netty-transport-native-unix-common-4.1.93.Final-linux-x86_64.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final-linux-aarch_64.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final-linux-x86_64.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final-osx-aarch_64.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final-osx-x86_64.jar -+ - io.netty-netty-tcnative-boringssl-static-2.0.61.Final-windows-x86_64.jar -+ - io.netty-netty-tcnative-classes-2.0.61.Final.jar - * Prometheus client - - io.prometheus-simpleclient-0.5.0.jar - - io.prometheus-simpleclient_common-0.5.0.jar -diff --git a/pom.xml b/pom.xml -index fa629aeb7c..0e841b4ab5 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -110,8 +110,8 @@ flexible messaging model and an intuitive client API. - 1.1.10.1 - 3.2.5 - 5.1.0 -- 4.1.89.Final -- 0.0.18.Final -+ 4.1.93.Final -+ 0.0.21.Final - 9.4.48.v20220622 - 2.5.2 - 2.34 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index ccfbd70877..dae80a80ec 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -232,31 +232,31 @@ The Apache Software License, Version 2.0 - - commons-lang3-3.11.jar - * Netty - - netty-3.10.6.Final.jar -- - netty-buffer-4.1.89.Final.jar -- - netty-codec-4.1.89.Final.jar -- - netty-codec-dns-4.1.89.Final.jar -- - netty-codec-http-4.1.89.Final.jar -- - netty-codec-haproxy-4.1.89.Final.jar -- - netty-codec-socks-4.1.89.Final.jar -- - netty-handler-proxy-4.1.89.Final.jar -- - netty-common-4.1.89.Final.jar -- - netty-handler-4.1.89.Final.jar -+ - netty-buffer-4.1.93.Final.jar -+ - netty-codec-4.1.93.Final.jar -+ - netty-codec-dns-4.1.93.Final.jar -+ - netty-codec-http-4.1.93.Final.jar -+ - netty-codec-haproxy-4.1.93.Final.jar -+ - netty-codec-socks-4.1.93.Final.jar -+ - netty-handler-proxy-4.1.93.Final.jar -+ - netty-common-4.1.93.Final.jar -+ - netty-handler-4.1.93.Final.jar - - netty-reactive-streams-2.0.6.jar -- - netty-resolver-4.1.89.Final.jar -- - netty-resolver-dns-4.1.89.Final.jar -- - netty-tcnative-boringssl-static-2.0.56.Final.jar -- - netty-tcnative-boringssl-static-2.0.56.Final-linux-aarch_64.jar -- - netty-tcnative-boringssl-static-2.0.56.Final-linux-x86_64.jar -- - netty-tcnative-boringssl-static-2.0.56.Final-osx-aarch_64.jar -- - netty-tcnative-boringssl-static-2.0.56.Final-osx-x86_64.jar -- - netty-tcnative-boringssl-static-2.0.56.Final-windows-x86_64.jar -- - netty-tcnative-classes-2.0.56.Final.jar -- - netty-transport-4.1.89.Final.jar -- - netty-transport-classes-epoll-4.1.89.Final.jar -- - netty-transport-native-epoll-4.1.89.Final-linux-x86_64.jar -- - netty-transport-native-unix-common-4.1.89.Final.jar -- - netty-transport-native-unix-common-4.1.89.Final-linux-x86_64.jar -- - netty-codec-http2-4.1.87.Final.jar -+ - netty-resolver-4.1.93.Final.jar -+ - netty-resolver-dns-4.1.93.Final.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final-linux-aarch_64.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final-linux-x86_64.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final-osx-aarch_64.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final-osx-x86_64.jar -+ - netty-tcnative-boringssl-static-2.0.61.Final-windows-x86_64.jar -+ - netty-tcnative-classes-2.0.61.Final.jar -+ - netty-transport-4.1.93.Final.jar -+ - netty-transport-classes-epoll-4.1.93.Final.jar -+ - netty-transport-native-epoll-4.1.93.Final-linux-x86_64.jar -+ - netty-transport-native-unix-common-4.1.93.Final.jar -+ - netty-transport-native-unix-common-4.1.93.Final-linux-x86_64.jar -+ - netty-codec-http2-4.1.87.Final.jar - * GRPC - - grpc-api-1.45.1.jar - - grpc-context-1.45.1.jar diff --git a/0007-CVE-2022-1471.patch b/0007-CVE-2022-1471.patch deleted file mode 100644 index b65c2f0b2c3120388bd9cbf92b50e74ab88b52e4..0000000000000000000000000000000000000000 --- a/0007-CVE-2022-1471.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index a413803445..996cb16751 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -334,9 +334,9 @@ The Apache Software License, Version 2.0 - * J2ObjC Annotations -- com.google.j2objc-j2objc-annotations-1.3.jar - * Netty Reactive Streams -- com.typesafe.netty-netty-reactive-streams-2.0.6.jar - * Swagger -- - io.swagger-swagger-annotations-1.6.2.jar -- - io.swagger-swagger-core-1.6.2.jar -- - io.swagger-swagger-models-1.6.2.jar -+ - io.swagger-swagger-annotations-1.6.10.jar -+ - io.swagger-swagger-core-1.6.10.jar -+ - io.swagger-swagger-models-1.6.10.jar - * DataSketches - - com.yahoo.datasketches-memory-0.8.3.jar - - com.yahoo.datasketches-sketches-core-0.8.3.jar -diff --git a/pom.xml b/pom.xml -index 0e841b4ab5..81cf8b6b7c 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -126,7 +126,7 @@ flexible messaging model and an intuitive client API. - 1.0.2 - 2.13.4.20221013 - 0.9.11 -- 1.6.2 -+ 1.6.10 - 8.37 - 1.4.13 - 0.5.0 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index dae80a80ec..8716eec69c 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -475,7 +475,7 @@ The Apache Software License, Version 2.0 - * Apache Yetus Audience Annotations - - audience-annotations-0.5.0.jar - * Swagger -- - swagger-annotations-1.6.2.jar -+ - swagger-annotations-1.6.10.jar - * Perfmark - - perfmark-api-0.19.0.jar - * Annotations diff --git a/0008-CVE-2023-26048.patch b/0008-CVE-2023-26048.patch deleted file mode 100644 index f884178957c7e65093a33484970ca9059a867f94..0000000000000000000000000000000000000000 --- a/0008-CVE-2023-26048.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 996cb16751..87c54acbe3 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -433,25 +433,25 @@ The Apache Software License, Version 2.0 - - org.asynchttpclient-async-http-client-2.12.1.jar - - org.asynchttpclient-async-http-client-netty-utils-2.12.1.jar - * Jetty -- - org.eclipse.jetty-jetty-client-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-continuation-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-http-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-io-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-proxy-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-security-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-server-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-servlet-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-servlets-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-util-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-util-ajax-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-javax-websocket-client-impl-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-websocket-api-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-websocket-client-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-websocket-common-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-websocket-server-9.4.48.v20220622.jar -- - org.eclipse.jetty.websocket-websocket-servlet-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-alpn-conscrypt-server-9.4.48.v20220622.jar -- - org.eclipse.jetty-jetty-alpn-server-9.4.48.v20220622.jar -+ - org.eclipse.jetty-jetty-client-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-continuation-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-http-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-io-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-proxy-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-security-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-server-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-servlet-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-servlets-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-util-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-util-ajax-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-javax-websocket-client-impl-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-websocket-api-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-websocket-client-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-websocket-common-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-websocket-server-9.4.51.v20230217.jar -+ - org.eclipse.jetty.websocket-websocket-servlet-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-alpn-conscrypt-server-9.4.51.v20230217.jar -+ - org.eclipse.jetty-jetty-alpn-server-9.4.51.v20230217.jar - * SnakeYaml -- org.yaml-snakeyaml-1.32.jar - * RocksDB - org.rocksdb-rocksdbjni-6.10.2.jar - * Google Error Prone Annotations - com.google.errorprone-error_prone_annotations-2.5.1.jar -diff --git a/pom.xml b/pom.xml -index 81cf8b6b7c..52c1e587ad 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -112,7 +112,7 @@ flexible messaging model and an intuitive client API. - 5.1.0 - 4.1.93.Final - 0.0.21.Final -- 9.4.48.v20220622 -+ 9.4.51.v20230217 - 2.5.2 - 2.34 - 1.10.50 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 8716eec69c..636fb61db9 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -274,22 +274,22 @@ The Apache Software License, Version 2.0 - - joda-time-2.10.5.jar - - failsafe-2.4.4.jar - * Jetty -- - http2-client-9.4.48.v20220622.jar -- - http2-common-9.4.48.v20220622.jar -- - http2-hpack-9.4.48.v20220622.jar -- - http2-http-client-transport-9.4.48.v20220622.jar -- - jetty-alpn-client-9.4.48.v20220622.jar -- - http2-server-9.4.48.v20220622.jar -- - jetty-alpn-java-client-9.4.48.v20220622.jar -- - jetty-client-9.4.48.v20220622.jar -- - jetty-http-9.4.48.v20220622.jar -- - jetty-io-9.4.48.v20220622.jar -- - jetty-jmx-9.4.48.v20220622.jar -- - jetty-security-9.4.48.v20220622.jar -- - jetty-server-9.4.48.v20220622.jar -- - jetty-servlet-9.4.48.v20220622.jar -- - jetty-util-9.4.48.v20220622.jar -- - jetty-util-ajax-9.4.48.v20220622.jar -+ - http2-client-9.4.51.v20230217.jar -+ - http2-common-9.4.51.v20230217.jar -+ - http2-hpack-9.4.51.v20230217.jar -+ - http2-http-client-transport-9.4.51.v20230217.jar -+ - jetty-alpn-client-9.4.51.v20230217.jar -+ - http2-server-9.4.51.v20230217.jar -+ - jetty-alpn-java-client-9.4.51.v20230217.jar -+ - jetty-client-9.4.51.v20230217.jar -+ - jetty-http-9.4.51.v20230217.jar -+ - jetty-io-9.4.51.v20230217.jar -+ - jetty-jmx-9.4.51.v20230217.jar -+ - jetty-security-9.4.51.v20230217.jar -+ - jetty-server-9.4.51.v20230217.jar -+ - jetty-servlet-9.4.51.v20230217.jar -+ - jetty-util-9.4.51.v20230217.jar -+ - jetty-util-ajax-9.4.51.v20230217.jar - * Apache BVal - - bval-jsr-2.0.0.jar - * Bytecode diff --git a/0009-CVE-2022-24329.patch b/0009-CVE-2022-24329.patch deleted file mode 100644 index 6e01b05c87e1a7509e167b06d1478777004f72c0..0000000000000000000000000000000000000000 --- a/0009-CVE-2022-24329.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 87c54acbe3..e32d3d9f43 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -462,10 +462,10 @@ The Apache Software License, Version 2.0 - * Okio - com.squareup.okio-okio-2.8.0.jar - * Javassist -- org.javassist-javassist-3.25.0-GA.jar - * Kotlin Standard Lib -- - org.jetbrains.kotlin-kotlin-stdlib-1.4.32.jar -- - org.jetbrains.kotlin-kotlin-stdlib-common-1.4.32.jar -- - org.jetbrains.kotlin-kotlin-stdlib-jdk7-1.4.32.jar -- - org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.4.32.jar -+ - org.jetbrains.kotlin-kotlin-stdlib-1.6.0.jar -+ - org.jetbrains.kotlin-kotlin-stdlib-common-1.6.0.jar -+ - org.jetbrains.kotlin-kotlin-stdlib-jdk7-1.6.0.jar -+ - org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.6.0.jar - - org.jetbrains-annotations-13.0.jar - * gRPC - - io.grpc-grpc-all-1.45.1.jar -diff --git a/pom.xml b/pom.xml -index 52c1e587ad..5bdf7946f5 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -203,7 +203,7 @@ flexible messaging model and an intuitive client API. - - 2.8.0 - -- 1.4.32 -+ 1.6.0 - 1.0 - 9.1.6 - 5.3.19 -diff --git a/src/owasp-dependency-check-suppressions.xml b/src/owasp-dependency-check-suppressions.xml -index 201a23baa0..07300d2601 100644 ---- a/src/owasp-dependency-check-suppressions.xml -+++ b/src/owasp-dependency-check-suppressions.xml -@@ -60,36 +60,6 @@ - .* - - -- -- -- -- ef50bfa2c0491a11dcc35d9822edbfd6170e1ea2 -- cpe:/a:jetbrains:kotlin -- -- -- -- 3546900a3ebff0c43f31190baf87a9220e37b7ea -- CVE-2022-24329 -- -- -- -- 3302f9ec8a5c1ed220781dbd37770072549bd333 -- CVE-2022-24329 -- -- -- -- 461367948840adbb0839c51d91ed74ef4a9ccb52 -- CVE-2022-24329 -- -- - - - - 1.6.0 - 1.0 - 9.1.6 -- 5.3.19 -+ 5.3.20 - 4.5.13 - 0.5.11 - 1.32 -diff --git a/pulsar-io/batch-data-generator/pom.xml b/pulsar-io/batch-data-generator/pom.xml -index 8808917e5e..7611a27fe3 100644 ---- a/pulsar-io/batch-data-generator/pom.xml -+++ b/pulsar-io/batch-data-generator/pom.xml -@@ -47,7 +47,7 @@ - - org.springframework - spring-context -- ${spring-context.version} -+ ${spring.version} - - - -diff --git a/pulsar-io/batch-discovery-triggerers/pom.xml b/pulsar-io/batch-discovery-triggerers/pom.xml -index 66f7d4e17e..b8435ac1ac 100644 ---- a/pulsar-io/batch-discovery-triggerers/pom.xml -+++ b/pulsar-io/batch-discovery-triggerers/pom.xml -@@ -47,7 +47,7 @@ - - org.springframework - spring-context -- ${spring-context.version} -+ ${spring.version} - - - -diff --git a/pulsar-io/canal/pom.xml b/pulsar-io/canal/pom.xml -index eef6d346e6..3519ab0f1c 100644 ---- a/pulsar-io/canal/pom.xml -+++ b/pulsar-io/canal/pom.xml -@@ -33,7 +33,6 @@ - Pulsar IO :: Canal - - -- 5.3.19 - 1.1.5 - - -@@ -121,4 +120,4 @@ - - - -- -\ No newline at end of file -+ diff --git a/0011-CVE-2023-25194.patch b/0011-CVE-2023-25194.patch deleted file mode 100644 index 35fb0763c16534a93ce09879557b5de76240ce41..0000000000000000000000000000000000000000 --- a/0011-CVE-2023-25194.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pom.xml b/pom.xml -index c6d4dcc9c7..0cbb930786 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -142,7 +142,7 @@ flexible messaging model and an intuitive client API. - 2.2.0 - 3.6.0 - 4.4.20 -- 2.7.2 -+ 3.4.0 - 5.1.1 - 1.12.262 - 1.10.2 diff --git a/0012-CVE-2023-2976.patch b/0012-CVE-2023-2976.patch deleted file mode 100644 index 13a9e4bb578a3708b5e249945e3bb29b09e532f2..0000000000000000000000000000000000000000 --- a/0012-CVE-2023-2976.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/buildtools/pom.xml b/buildtools/pom.xml -index 9dbbba70f9..1c78a05f94 100644 ---- a/buildtools/pom.xml -+++ b/buildtools/pom.xml -@@ -47,7 +47,7 @@ - 8.37 - 3.1.2 - 4.2.3 -- 32.0.0-jre -+ 32.1.1-jre - 1.10.12 - 1.32 - -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index e32d3d9f43..0c11baa362 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -328,7 +328,7 @@ The Apache Software License, Version 2.0 - - com.google.code.gson-gson-2.8.9.jar - - io.gsonfire-gson-fire-1.8.5.jar - * Guava -- - com.google.guava-guava-32.0.0-jre.jar -+ - com.google.guava-guava-32.1.1-jre.jar - - com.google.guava-failureaccess-1.0.1.jar - - com.google.guava-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - * J2ObjC Annotations -- com.google.j2objc-j2objc-annotations-1.3.jar -diff --git a/pom.xml b/pom.xml -index 0cbb930786..272da71732 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -168,7 +168,7 @@ flexible messaging model and an intuitive client API. - 0.11.1 - 0.28.0 - 2.4.9 -- 32.0.0-jre -+ 32.1.1-jre - 1.0 - 0.14.0 - 7.0.1 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 636fb61db9..47e4fbcfa5 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -221,7 +221,7 @@ The Apache Software License, Version 2.0 - - jackson-module-jaxb-annotations-2.13.4.jar - - jackson-module-jsonSchema-2.13.4.jar - * Guava -- - guava-32.0.0-jre.jar -+ - guava-32.1.1-jre.jar - - listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - - failureaccess-1.0.1.jar - * Google Guice -diff --git a/pulsar-sql/presto-distribution/pom.xml b/pulsar-sql/presto-distribution/pom.xml -index 990c806e44..bde34a1616 100644 ---- a/pulsar-sql/presto-distribution/pom.xml -+++ b/pulsar-sql/presto-distribution/pom.xml -@@ -39,7 +39,7 @@ - 2.6 - 0.0.12 - 3.0.5 -- 32.0.0-jre -+ 32.1.1-jre - 2.12.1 - 2.5.1 - 4.0.1 diff --git a/0013-fix-deadlock.patch b/0013-fix-deadlock.patch deleted file mode 100644 index c059709492651d7b2033826644299ff3dc24db86..0000000000000000000000000000000000000000 --- a/0013-fix-deadlock.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java -index a350d4a5b3..ed6870824b 100644 ---- a/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java -+++ b/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKSessionWatcher.java -@@ -80,7 +80,11 @@ public class ZKSessionWatcher implements AutoCloseable, Watcher { - } - - // task that runs every TICK_TIME to check zk connection -- private synchronized void checkConnectionStatus() { -+ // NOT ThreadSafe: -+ // If zk client can't ensure the order, it may lead to problems. -+ // Currently,we only use it in single thread, it will be fine. but we shouldn't leave any potential problems -+ // in the future. -+ private void checkConnectionStatus() { - try { - CompletableFuture future = new CompletableFuture<>(); - zk.exists("/", false, (StatCallback) (rc, path, ctx, stat) -> { -@@ -125,7 +129,7 @@ public class ZKSessionWatcher implements AutoCloseable, Watcher { - currentStatus = SessionEvent.SessionLost; - } - -- private void checkState(Watcher.Event.KeeperState zkClientState) { -+ private synchronized void checkState(Watcher.Event.KeeperState zkClientState) { - switch (zkClientState) { - case Expired: - if (currentStatus != SessionEvent.SessionLost) { diff --git a/0014-CVE-2023-32732.patch b/0014-CVE-2023-32732.patch deleted file mode 100644 index 3e50c7f0b25b9b43cae43719e21f09a75792cf30..0000000000000000000000000000000000000000 --- a/0014-CVE-2023-32732.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt -index 0c11baa362..82b3f0af59 100644 ---- a/distribution/server/src/assemble/LICENSE.bin.txt -+++ b/distribution/server/src/assemble/LICENSE.bin.txt -@@ -322,7 +322,7 @@ The Apache Software License, Version 2.0 - - com.fasterxml.jackson.module-jackson-module-jsonSchema-2.13.4.jar - * Caffeine -- com.github.ben-manes.caffeine-caffeine-2.9.1.jar - * Conscrypt -- org.conscrypt-conscrypt-openjdk-uber-2.5.2.jar -- * Proto Google Common Protos -- com.google.api.grpc-proto-google-common-protos-2.0.1.jar -+ * Proto Google Common Protos -- com.google.api.grpc-proto-google-common-protos-2.9.0.jar - * Bitbucket -- org.bitbucket.b_c-jose4j-0.7.6.jar - * Gson - - com.google.code.gson-gson-2.8.9.jar -@@ -468,24 +468,26 @@ The Apache Software License, Version 2.0 - - org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.6.0.jar - - org.jetbrains-annotations-13.0.jar - * gRPC -- - io.grpc-grpc-all-1.45.1.jar -- - io.grpc-grpc-auth-1.45.1.jar -- - io.grpc-grpc-context-1.45.1.jar -- - io.grpc-grpc-core-1.45.1.jar -- - io.grpc-grpc-netty-1.45.1.jar -- - io.grpc-grpc-protobuf-1.45.1.jar -- - io.grpc-grpc-protobuf-lite-1.45.1.jar -- - io.grpc-grpc-stub-1.45.1.jar -- - io.grpc-grpc-alts-1.45.1.jar -- - io.grpc-grpc-api-1.45.1.jar -- - io.grpc-grpc-grpclb-1.45.1.jar -- - io.grpc-grpc-netty-shaded-1.45.1.jar -- - io.grpc-grpc-services-1.45.1.jar -- - io.grpc-grpc-xds-1.45.1.jar -- - io.grpc-grpc-rls-1.45.1.jar -+ - io.grpc-grpc-all-1.55.3.jar -+ - io.grpc-grpc-auth-1.55.3.jar -+ - io.grpc-grpc-context-1.55.3.jar -+ - io.grpc-grpc-core-1.55.3.jar -+ - io.grpc-grpc-netty-1.55.3.jar -+ - io.grpc-grpc-protobuf-1.55.3.jar -+ - io.grpc-grpc-protobuf-lite-1.55.3.jar -+ - io.grpc-grpc-stub-1.55.3.jar -+ - io.grpc-grpc-alts-1.55.3.jar -+ - io.grpc-grpc-api-1.55.3.jar -+ - io.grpc-grpc-grpclb-1.55.3.jar -+ - io.grpc-grpc-netty-shaded-1.55.3.jar -+ - io.grpc-grpc-services-1.55.3.jar -+ - io.grpc-grpc-xds-1.55.3.jar -+ - io.grpc-grpc-rls-1.55.3.jar -+ - io.grpc-grpc-servlet-1.55.3.jar -+ - io.grpc-grpc-servlet-jakarta-1.55.3.jar - - com.google.auto.service-auto-service-annotations-1.0.jar - * Perfmark -- - io.perfmark-perfmark-api-0.19.0.jar -+ - io.perfmark-perfmark-api-0.26.0.jar - * OpenCensus - - io.opencensus-opencensus-api-0.28.0.jar - - io.opencensus-opencensus-contrib-http-util-0.28.0.jar -@@ -535,7 +537,7 @@ The Apache Software License, Version 2.0 - - com.google.http-client-google-http-client-gson-1.41.0.jar - - com.google.http-client-google-http-client-1.41.0.jar - - com.google.auto.value-auto-value-annotations-1.9.jar -- - com.google.re2j-re2j-1.5.jar -+ - com.google.re2j-re2j-1.6.jar - * Jetcd - - io.etcd-jetcd-common-0.5.11.jar - - io.etcd-jetcd-core-0.5.11.jar -diff --git a/pom.xml b/pom.xml -index 272da71732..3ee138c11a 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -132,9 +132,9 @@ flexible messaging model and an intuitive client API. - 0.5.0 - 3.19.6 - ${protobuf3.version} -- 1.45.1 -+ 1.55.3 - 1.41.0 -- 0.19.0 -+ 0.26.0 - ${grpc.version} - 2.8.9 - 1.2.1 -diff --git a/pulsar-sql/presto-distribution/LICENSE b/pulsar-sql/presto-distribution/LICENSE -index 47e4fbcfa5..3a3da7a4ca 100644 ---- a/pulsar-sql/presto-distribution/LICENSE -+++ b/pulsar-sql/presto-distribution/LICENSE -@@ -258,14 +258,14 @@ The Apache Software License, Version 2.0 - - netty-transport-native-unix-common-4.1.93.Final-linux-x86_64.jar - - netty-codec-http2-4.1.87.Final.jar - * GRPC -- - grpc-api-1.45.1.jar -- - grpc-context-1.45.1.jar -- - grpc-core-1.45.1.jar -- - grpc-grpclb-1.45.1.jar -- - grpc-netty-1.45.1.jar -- - grpc-protobuf-1.45.1.jar -- - grpc-protobuf-lite-1.45.1.jar -- - grpc-stub-1.45.1.jar -+ - grpc-api-1.55.3.jar -+ - grpc-context-1.55.3.jar -+ - grpc-core-1.55.3.jar -+ - grpc-grpclb-1.55.3.jar -+ - grpc-netty-1.55.3.jar -+ - grpc-protobuf-1.55.3.jar -+ - grpc-protobuf-lite-1.55.3.jar -+ - grpc-stub-1.55.3.jar - * JEtcd - - jetcd-common-0.5.11.jar - - jetcd-core-0.5.11.jar -@@ -477,7 +477,7 @@ The Apache Software License, Version 2.0 - * Swagger - - swagger-annotations-1.6.10.jar - * Perfmark -- - perfmark-api-0.19.0.jar -+ - perfmark-api-0.26.0.jar - * Annotations - - auto-service-annotations-1.0.jar - -@@ -485,7 +485,7 @@ Protocol Buffers License - * Protocol Buffers - - protobuf-java-3.19.6.jar - - protobuf-java-util-3.19.6.jar -- - proto-google-common-protos-2.0.1.jar -+ - proto-google-common-protos-2.9.0.jar - - BSD 3-clause "New" or "Revised" License - * RE2J TD -- re2j-td-1.4.jar diff --git a/0015-fix-no-messages.patch b/0015-fix-no-messages.patch deleted file mode 100644 index e4c0aadd2cef79a05d7496bf63376c634ffad732..0000000000000000000000000000000000000000 --- a/0015-fix-no-messages.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java -index 1e1245ed36..cf1603788f 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/ReplicatedSubscriptionsController.java -@@ -192,10 +192,14 @@ public class ReplicatedSubscriptionsController implements AutoCloseable, Topic.P - sub.acknowledgeMessage(Collections.singletonList(pos), AckType.Cumulative, Collections.emptyMap()); - } else { - // Subscription doesn't exist. We need to force the creation of the subscription in this cluster, because -- log.info("[{}][{}] Creating subscription at {}:{} after receiving update from replicated subcription", -+ log.info("[{}][{}] Creating subscription at {}:{} after receiving update from replicated subscription", - topic, update.getSubscriptionName(), updatedMessageId.getLedgerId(), pos); -- topic.createSubscription(update.getSubscriptionName(), -- InitialPosition.Latest, true /* replicateSubscriptionState */, null); -+ topic.createSubscription(update.getSubscriptionName(), InitialPosition.Earliest, -+ true /* replicateSubscriptionState */, Collections.emptyMap()) -+ .thenAccept(subscriptionCreated -> { -+ subscriptionCreated.acknowledgeMessage(Collections.singletonList(pos), -+ AckType.Cumulative, Collections.emptyMap()); -+ }); - } - } - -diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorSubscriptionTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorSubscriptionTest.java -index 046adaa5ec..fb5bae08f6 100644 ---- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorSubscriptionTest.java -+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorSubscriptionTest.java -@@ -25,9 +25,11 @@ import static org.testng.Assert.assertNotNull; - import static org.testng.Assert.assertNull; - import static org.testng.Assert.assertTrue; - import com.google.common.collect.Sets; -+import static org.testng.Assert.fail; - import java.lang.reflect.Method; - import java.nio.charset.StandardCharsets; - import java.util.ArrayList; -+import java.util.Collections; - import java.util.HashSet; - import java.util.LinkedHashSet; - import java.util.Map; -@@ -41,6 +43,7 @@ import org.apache.pulsar.broker.service.persistent.PersistentTopic; - import org.apache.pulsar.broker.service.persistent.ReplicatedSubscriptionsController; - import org.apache.pulsar.client.api.Consumer; - import org.apache.pulsar.client.api.Message; -+import org.apache.pulsar.client.api.MessageId; - import org.apache.pulsar.client.api.MessageRoutingMode; - import org.apache.pulsar.client.api.Producer; - import org.apache.pulsar.client.api.PulsarClient; -@@ -48,6 +51,7 @@ import org.apache.pulsar.client.api.PulsarClientException; - import org.apache.pulsar.client.api.Schema; - import org.apache.pulsar.common.policies.data.PartitionedTopicStats; - import org.apache.pulsar.common.policies.data.TopicStats; -+import org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap; - import org.awaitility.Awaitility; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -@@ -154,6 +158,94 @@ public class ReplicatorSubscriptionTest extends ReplicatorTestBase { - "messages don't match."); - } - -+ @Test -+ public void testReplicatedSubscribeAndSwitchToStandbyCluster() throws Exception { -+ final String namespace = BrokerTestUtil.newUniqueName("pulsar/ns_"); -+ final String topicName = BrokerTestUtil.newUniqueName("persistent://" + namespace + "/tp_"); -+ final String subscriptionName = "s1"; -+ final boolean isReplicatedSubscription = true; -+ final int messagesCount = 20; -+ final LinkedHashSet sentMessages = new LinkedHashSet<>(); -+ final Set receivedMessages = Collections.synchronizedSet(new LinkedHashSet<>()); -+ admin1.namespaces().createNamespace(namespace); -+ admin1.namespaces().setNamespaceReplicationClusters(namespace, Sets.newHashSet("r1", "r2")); -+ admin1.topics().createNonPartitionedTopic(topicName); -+ admin1.topics().createSubscription(topicName, subscriptionName, MessageId.earliest, isReplicatedSubscription); -+ final PersistentTopic topic1 = -+ (PersistentTopic) pulsar1.getBrokerService().getTopic(topicName, false).join().get(); -+ -+ // Send messages -+ // Wait for the topic created on the cluster2. -+ // Wait for the snapshot created. -+ final PulsarClient client1 = PulsarClient.builder().serviceUrl(url1.toString()).build(); -+ Producer producer1 = client1.newProducer(Schema.STRING).topic(topicName).enableBatching(false).create(); -+ Consumer consumer1 = client1.newConsumer(Schema.STRING).topic(topicName) -+ .subscriptionName(subscriptionName).replicateSubscriptionState(isReplicatedSubscription).subscribe(); -+ for (int i = 0; i < messagesCount / 2; i++) { -+ String msg = i + ""; -+ producer1.send(msg); -+ sentMessages.add(msg); -+ } -+ Awaitility.await().untilAsserted(() -> { -+ ConcurrentOpenHashMap replicators = topic1.getReplicators(); -+ assertTrue(replicators != null && replicators.size() == 1, "Replicator should started"); -+ assertTrue(replicators.values().iterator().next().isConnected(), "Replicator should be connected"); -+ assertTrue(topic1.getReplicatedSubscriptionController().get().getLastCompletedSnapshotId().isPresent(), -+ "One snapshot should be finished"); -+ }); -+ final PersistentTopic topic2 = -+ (PersistentTopic) pulsar2.getBrokerService().getTopic(topicName, false).join().get(); -+ Awaitility.await().untilAsserted(() -> { -+ assertTrue(topic2.getReplicatedSubscriptionController().isPresent(), -+ "Replicated subscription controller should created"); -+ }); -+ for (int i = messagesCount / 2; i < messagesCount; i++) { -+ String msg = i + ""; -+ producer1.send(msg); -+ sentMessages.add(msg); -+ } -+ -+ // Consume half messages and wait the subscription created on the cluster2. -+ for (int i = 0; i < messagesCount / 2; i++){ -+ Message message = consumer1.receive(2, TimeUnit.SECONDS); -+ if (message == null) { -+ fail("Should not receive null."); -+ } -+ receivedMessages.add(message.getValue()); -+ consumer1.acknowledge(message); -+ } -+ Awaitility.await().untilAsserted(() -> { -+ assertNotNull(topic2.getSubscriptions().get(subscriptionName), "Subscription should created"); -+ }); -+ -+ // Switch client to cluster2. -+ // Since the cluster1 was not crash, all messages will be replicated to the cluster2. -+ consumer1.close(); -+ final PulsarClient client2 = PulsarClient.builder().serviceUrl(url2.toString()).build(); -+ final Consumer consumer2 = client2.newConsumer(Schema.AUTO_CONSUME()).topic(topicName) -+ .subscriptionName(subscriptionName).replicateSubscriptionState(isReplicatedSubscription).subscribe(); -+ -+ // Verify all messages will be consumed. -+ Awaitility.await().untilAsserted(() -> { -+ while (true) { -+ Message message = consumer2.receive(2, TimeUnit.SECONDS); -+ if (message != null) { -+ receivedMessages.add(message.getValue().toString()); -+ consumer2.acknowledge(message); -+ } else { -+ break; -+ } -+ } -+ assertEquals(receivedMessages.size(), sentMessages.size()); -+ }); -+ -+ consumer2.close(); -+ producer1.close(); -+ client1.close(); -+ client2.close(); -+ } -+ -+ - /** - * If there's no traffic, the snapshot creation should stop and then resume when traffic comes back - */ diff --git a/0016-handle-exception.patch b/0016-handle-exception.patch deleted file mode 100644 index c67a438e6bf37cecb982732fd4b144a28ff86ebf..0000000000000000000000000000000000000000 --- a/0016-handle-exception.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java -index fe1e60d201..b98a111455 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java -@@ -470,18 +470,20 @@ public class BookkeeperSchemaStorage implements SchemaStorage { - concat(locator.getIndexList(), newArrayList(info)) - ).build(), locatorEntry.version - ).thenApply(ignore -> nextVersion).whenComplete((__, ex) -> { -- Throwable cause = FutureUtil.unwrapCompletionException(ex); -- log.warn("[{}] Failed to update schema locator with position {}", schemaId, position, cause); -- if (cause instanceof AlreadyExistsException || cause instanceof BadVersionException) { -- bookKeeper.asyncDeleteLedger(position.getLedgerId(), new AsyncCallback.DeleteCallback() { -- @Override -- public void deleteComplete(int rc, Object ctx) { -- if (rc != BKException.Code.OK) { -- log.warn("[{}] Failed to delete ledger {} after updating schema locator failed, rc: {}", -+ if (ex != null) { -+ Throwable cause = FutureUtil.unwrapCompletionException(ex); -+ log.warn("[{}] Failed to update schema locator with position {}", schemaId, position, cause); -+ if (cause instanceof AlreadyExistsException || cause instanceof BadVersionException) { -+ bookKeeper.asyncDeleteLedger(position.getLedgerId(), new AsyncCallback.DeleteCallback() { -+ @Override -+ public void deleteComplete(int rc, Object ctx) { -+ if (rc != BKException.Code.OK) { -+ log.warn("[{}] Failed to delete ledger {} after updating schema locator failed, rc: {}", - schemaId, position.getLedgerId(), rc); -+ } - } -- } -- }, null); -+ }, null); -+ } - } - }); - } diff --git a/0017-return-earliest-position.patch b/0017-return-earliest-position.patch deleted file mode 100644 index 7a3e8ad8a51b8ec927c28c2f9f30ee7cf952570d..0000000000000000000000000000000000000000 --- a/0017-return-earliest-position.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java -index 46ca0f1400..0653e40cb3 100644 ---- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java -+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedCursor.java -@@ -532,6 +532,23 @@ public interface ManagedCursor { - void asyncFindNewestMatching(FindPositionConstraint constraint, Predicate condition, - FindEntryCallback callback, Object ctx); - -+ /** -+ * Find the newest entry that matches the given predicate. -+ * -+ * @param constraint -+ * search only active entries or all entries -+ * @param condition -+ * predicate that reads an entry an applies a condition -+ * @param callback -+ * callback object returning the resultant position -+ * @param ctx -+ * opaque context -+ * @param isFindFromLedger -+ * find the newest entry from ledger -+ */ -+ void asyncFindNewestMatching(FindPositionConstraint constraint, Predicate condition, -+ FindEntryCallback callback, Object ctx, boolean isFindFromLedger); -+ - /** - * reset the cursor to specified position to enable replay of messages. - * -diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java -index 011d3df77f..6045412398 100644 ---- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java -+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java -@@ -1078,6 +1078,12 @@ public class ManagedCursorImpl implements ManagedCursor { - @Override - public void asyncFindNewestMatching(FindPositionConstraint constraint, Predicate condition, - FindEntryCallback callback, Object ctx) { -+ asyncFindNewestMatching(constraint, condition, callback, ctx, false); -+ } -+ -+ @Override -+ public void asyncFindNewestMatching(FindPositionConstraint constraint, Predicate condition, -+ FindEntryCallback callback, Object ctx, boolean isFindFromLedger) { - OpFindNewest op; - PositionImpl startPosition = null; - long max = 0; -@@ -1099,7 +1105,11 @@ public class ManagedCursorImpl implements ManagedCursor { - Optional.empty(), ctx); - return; - } -- op = new OpFindNewest(this, startPosition, condition, max, callback, ctx); -+ if (isFindFromLedger) { -+ op = new OpFindNewest(this.ledger, startPosition, condition, max, callback, ctx); -+ } else { -+ op = new OpFindNewest(this, startPosition, condition, max, callback, ctx); -+ } - op.find(); - } - -diff --git a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerTest.java b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerTest.java -index 18fe4dba31..675f28e2d2 100644 ---- a/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerTest.java -+++ b/managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorContainerTest.java -@@ -241,6 +241,11 @@ public class ManagedCursorContainerTest { - AsyncCallbacks.FindEntryCallback callback, Object ctx) { - } - -+ @Override -+ public void asyncFindNewestMatching(FindPositionConstraint constraint, Predicate condition, -+ AsyncCallbacks.FindEntryCallback callback, Object ctx, boolean isFindFromLedger) { -+ } -+ - @Override - public void asyncResetCursor(final Position position, boolean forceReset, - AsyncCallbacks.ResetCursorCallback callback) { -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageFinder.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageFinder.java -index 825bc546f4..838771e6d3 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageFinder.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageFinder.java -@@ -71,7 +71,7 @@ public class PersistentMessageFinder implements AsyncCallbacks.FindEntryCallback - entry.release(); - } - return false; -- }, this, callback); -+ }, this, callback, true); - } else { - if (log.isDebugEnabled()) { - log.debug("[{}][{}] Ignore message position find scheduled task, last find is still running", topicName, -diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java -index e70d0dc2b5..da78a0411d 100644 ---- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java -+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentMessageFinderTest.java -@@ -243,6 +243,40 @@ public class PersistentMessageFinderTest extends MockedBookKeeperTestCase { - factory.shutdown(); - } - -+ @Test -+ void testPersistentMessageFinderWhenLastMessageDelete() throws Exception { -+ final String ledgerAndCursorName = "testPersistentMessageFinderWhenLastMessageDelete"; -+ -+ ManagedLedgerConfig config = new ManagedLedgerConfig(); -+ config.setRetentionSizeInMB(10); -+ config.setMaxEntriesPerLedger(10); -+ config.setRetentionTime(1, TimeUnit.HOURS); -+ ManagedLedger ledger = factory.open(ledgerAndCursorName, config); -+ ManagedCursorImpl cursor = (ManagedCursorImpl) ledger.openCursor(ledgerAndCursorName); -+ -+ ledger.addEntry(createMessageWrittenToLedger("msg1")); -+ ledger.addEntry(createMessageWrittenToLedger("msg2")); -+ ledger.addEntry(createMessageWrittenToLedger("msg3")); -+ Position lastPosition = ledger.addEntry(createMessageWrittenToLedger("last-message")); -+ -+ long endTimestamp = System.currentTimeMillis() + 1000; -+ -+ Result result = new Result(); -+ // delete last position message -+ cursor.delete(lastPosition); -+ CompletableFuture future = findMessage(result, cursor, endTimestamp); -+ future.get(); -+ assertNull(result.exception); -+ assertNotEquals(result.position, null); -+ assertEquals(result.position, lastPosition); -+ -+ result.reset(); -+ cursor.close(); -+ ledger.close(); -+ factory.shutdown(); -+ } -+ -+ - @Test - void testPersistentMessageFinderWithBrokerTimestampForMessage() throws Exception { - diff --git a/0018-return-when-AbstractDispatcherSingleActiveConsumer-closed.patch b/0018-return-when-AbstractDispatcherSingleActiveConsumer-closed.patch deleted file mode 100644 index 957df93b56a83eda7f7f3d8299f03604ffefb7f4..0000000000000000000000000000000000000000 --- a/0018-return-when-AbstractDispatcherSingleActiveConsumer-closed.patch +++ /dev/null @@ -1,167 +0,0 @@ -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherSingleActiveConsumer.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherSingleActiveConsumer.java -index 8cab06be11..17a6d1dbfb 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherSingleActiveConsumer.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherSingleActiveConsumer.java -@@ -140,6 +140,7 @@ public abstract class AbstractDispatcherSingleActiveConsumer extends AbstractBas - if (IS_CLOSED_UPDATER.get(this) == TRUE) { - log.warn("[{}] Dispatcher is already closed. Closing consumer {}", this.topicName, consumer); - consumer.disconnect(); -+ return; - } - - if (subscriptionType == SubType.Exclusive && !consumers.isEmpty()) { -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java -index 9694584025..1d74d00776 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentDispatcherMultipleConsumers.java -@@ -47,7 +47,7 @@ public class NonPersistentDispatcherMultipleConsumers extends AbstractDispatcher - protected final Subscription subscription; - - private CompletableFuture closeFuture = null; -- private final String name; -+ protected final String name; - protected final Rate msgDrop; - protected static final AtomicIntegerFieldUpdater - TOTAL_AVAILABLE_PERMITS_UPDATER = AtomicIntegerFieldUpdater -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java -index e5e5349651..da7fe56bde 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumers.java -@@ -39,6 +39,8 @@ import org.apache.pulsar.common.api.proto.CommandSubscribe.SubType; - import org.apache.pulsar.common.api.proto.KeySharedMeta; - import org.apache.pulsar.common.api.proto.KeySharedMode; - import org.apache.pulsar.common.protocol.Commands; -+import org.slf4j.Logger; -+import org.slf4j.LoggerFactory; - - public class NonPersistentStickyKeyDispatcherMultipleConsumers extends NonPersistentDispatcherMultipleConsumers { - -@@ -84,6 +86,11 @@ public class NonPersistentStickyKeyDispatcherMultipleConsumers extends NonPersis - - @Override - public synchronized void addConsumer(Consumer consumer) throws BrokerServiceException { -+ if (IS_CLOSED_UPDATER.get(this) == TRUE) { -+ log.warn("[{}] Dispatcher is already closed. Closing consumer {}", name, consumer); -+ consumer.disconnect(); -+ return; -+ } - super.addConsumer(consumer); - try { - selector.addConsumer(consumer); -@@ -168,4 +175,6 @@ public class NonPersistentStickyKeyDispatcherMultipleConsumers extends NonPersis - public boolean hasSameKeySharedPolicy(KeySharedMeta ksm) { - return (ksm.getKeySharedMode() == this.keySharedMode); - } -+ -+ private static final Logger log = LoggerFactory.getLogger(NonPersistentStickyKeyDispatcherMultipleConsumers.class); - } -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java -index 90db639fde..e5b6f68bdf 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumers.java -@@ -18,6 +18,7 @@ - */ - package org.apache.pulsar.broker.service.persistent; - -+import com.google.common.annotations.VisibleForTesting; - import io.netty.util.concurrent.FastThreadLocal; - import java.util.ArrayList; - import java.util.Collections; -@@ -99,8 +100,18 @@ public class PersistentStickyKeyDispatcherMultipleConsumers extends PersistentDi - } - } - -+ @VisibleForTesting -+ public StickyKeyConsumerSelector getSelector() { -+ return selector; -+ } -+ - @Override - public synchronized void addConsumer(Consumer consumer) throws BrokerServiceException { -+ if (IS_CLOSED_UPDATER.get(this) == TRUE) { -+ log.warn("[{}] Dispatcher is already closed. Closing consumer {}", name, consumer); -+ consumer.disconnect(); -+ return; -+ } - super.addConsumer(consumer); - try { - selector.addConsumer(consumer); -diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentDispatcherFailoverConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentDispatcherFailoverConsumerTest.java -index 31e6f5579b..2b58ddfa88 100644 ---- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentDispatcherFailoverConsumerTest.java -+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentDispatcherFailoverConsumerTest.java -@@ -293,6 +293,7 @@ public class PersistentDispatcherFailoverConsumerTest { - assertEquals(isActive, change.isIsActive()); - } - -+ - @Test - public void testConsumerGroupChangesWithOldNewConsumers() throws Exception { - PersistentTopic topic = new PersistentTopic(successTopicName, ledgerMock, brokerService); -diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumersTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumersTest.java -index f319b7ce4a..b21f80ce1f 100644 ---- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumersTest.java -+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/nonpersistent/NonPersistentStickyKeyDispatcherMultipleConsumersTest.java -@@ -51,6 +51,7 @@ import org.apache.pulsar.broker.service.EntryBatchSizes; - import org.apache.pulsar.broker.service.HashRangeAutoSplitStickyKeyConsumerSelector; - import org.apache.pulsar.broker.service.RedeliveryTracker; - import org.apache.pulsar.broker.service.persistent.DispatchRateLimiter; -+import org.apache.pulsar.broker.service.StickyKeyConsumerSelector; - import org.apache.pulsar.common.api.proto.MessageMetadata; - import org.apache.pulsar.common.policies.data.HierarchyTopicPolicies; - import org.apache.pulsar.common.protocol.Commands; -@@ -67,6 +68,7 @@ public class NonPersistentStickyKeyDispatcherMultipleConsumersTest { - private ServiceConfiguration configMock; - - private NonPersistentStickyKeyDispatcherMultipleConsumers nonpersistentDispatcher; -+ private StickyKeyConsumerSelector selector; - - final String topicName = "non-persistent://public/default/testTopic"; - -@@ -93,6 +95,7 @@ public class NonPersistentStickyKeyDispatcherMultipleConsumersTest { - doReturn(topicPolicies).when(topicMock).getHierarchyTopicPolicies(); - - subscriptionMock = mock(NonPersistentSubscription.class); -+ selector = new HashRangeAutoSplitStickyKeyConsumerSelector(); - - try (MockedStatic rateLimiterMockedStatic = mockStatic(DispatchRateLimiter.class);) { - rateLimiterMockedStatic.when(() -> DispatchRateLimiter.isDispatchRateNeeded( -@@ -102,8 +105,7 @@ public class NonPersistentStickyKeyDispatcherMultipleConsumersTest { - any(DispatchRateLimiter.Type.class))) - .thenReturn(false); - nonpersistentDispatcher = new NonPersistentStickyKeyDispatcherMultipleConsumers( -- topicMock, subscriptionMock, -- new HashRangeAutoSplitStickyKeyConsumerSelector()); -+ topicMock, subscriptionMock, selector); - } - } - -diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersTest.java -index 99a66f44ac..587ef122ec 100644 ---- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersTest.java -+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentStickyKeyDispatcherMultipleConsumersTest.java -@@ -37,6 +37,7 @@ import static org.mockito.Mockito.times; - import static org.mockito.Mockito.verify; - import static org.mockito.Mockito.when; - import static org.testng.Assert.assertEquals; -+import static org.testng.Assert.assertTrue; - import static org.testng.Assert.fail; - import io.netty.buffer.ByteBuf; - import io.netty.buffer.Unpooled; -@@ -156,6 +157,16 @@ public class PersistentStickyKeyDispatcherMultipleConsumersTest { - } - } - -+ @Test(timeOut = 10000) -+ public void testAddConsumerWhenClosed() throws Exception { -+ persistentDispatcher.close().get(); -+ Consumer consumer = mock(Consumer.class); -+ persistentDispatcher.addConsumer(consumer); -+ verify(consumer, times(1)).disconnect(); -+ assertEquals(0, persistentDispatcher.getConsumers().size()); -+ assertTrue(persistentDispatcher.getSelector().getConsumerKeyHashRanges().isEmpty()); -+ } -+ - @Test - public void testSendMarkerMessage() { - try { diff --git a/0019-clean-inactive-bundle.patch b/0019-clean-inactive-bundle.patch deleted file mode 100644 index e18d319e219d0446dc0590b8a64441983d89c034..0000000000000000000000000000000000000000 --- a/0019-clean-inactive-bundle.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java -index d81f6949f4..8bf8a73ff1 100644 ---- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java -+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java -@@ -523,6 +523,7 @@ public class ModularLoadManagerImpl implements ModularLoadManager { - // load management decisions may be made. - private void updateBundleData() { - final Map bundleData = loadData.getBundleData(); -+ final Set activeBundles = new HashSet<>(); - // Iterate over the broker data. - for (Map.Entry brokerEntry : loadData.getBrokerData().entrySet()) { - final String broker = brokerEntry.getKey(); -@@ -534,6 +535,7 @@ public class ModularLoadManagerImpl implements ModularLoadManager { - for (Map.Entry entry : statsMap.entrySet()) { - final String bundle = entry.getKey(); - final NamespaceBundleStats stats = entry.getValue(); -+ activeBundles.add(bundle); - if (bundleData.containsKey(bundle)) { - // If we recognize the bundle, add these stats as a new sample. - bundleData.get(bundle).update(stats); -@@ -545,6 +547,16 @@ public class ModularLoadManagerImpl implements ModularLoadManager { - bundleData.put(bundle, currentBundleData); - } - } -+ //Remove not active bundle from loadData -+ for (String bundle : bundleData.keySet()) { -+ if (!activeBundles.contains(bundle)){ -+ bundleData.remove(bundle); -+ if (pulsar.getLeaderElectionService().isLeader()){ -+ deleteBundleDataFromMetadataStore(bundle); -+ } -+ } -+ } -+ - - // Remove all loaded bundles from the preallocated maps. - final Map preallocatedBundleData = brokerData.getPreallocatedBundleData(); diff --git a/apache-pulsar-2.10.4-src.tar.gz b/apache-pulsar-2.10.6-src.tar.gz similarity index 80% rename from apache-pulsar-2.10.4-src.tar.gz rename to apache-pulsar-2.10.6-src.tar.gz index a46afc10de7e0fc9b08a544ba777fda620e563fe..f58e7e5878b105004bcf856d8517459cfa77370f 100644 Binary files a/apache-pulsar-2.10.4-src.tar.gz and b/apache-pulsar-2.10.6-src.tar.gz differ diff --git a/pulsar.spec b/pulsar.spec index dd2e0c29feb6fac9f4de52b6ae9954d548d5d565..adb317e2883d9d2613686324d14ac7266a8fe1f1 100644 --- a/pulsar.spec +++ b/pulsar.spec @@ -1,6 +1,6 @@ %define debug_package %{nil} -%define pulsar_ver 2.10.4 -%define pkg_ver 19 +%define pulsar_ver 2.10.6 +%define pkg_ver 1 %define _prefix /opt/pulsar Summary: Cloud-Native, Distributed Messaging and Streaming Name: pulsar @@ -9,26 +9,8 @@ Release: %{pkg_ver} License: Apache-2.0 Group: Applications/Message URL: https://pulsar.apache.org -Source0: https://archive.apache.org/dist/pulsar/pulsar-2.10.4/apache-pulsar-2.10.4-src.tar.gz +Source0: https://archive.apache.org/dist/pulsar/pulsar-2.10.6/apache-pulsar-2.10.6-src.tar.gz Patch0001: 0001-use-huawei-repository.patch -Patch0002: 0002-resolve-cve-2023-32697.patch -Patch0003: 0003-CVE-2023-2976.patch -Patch0004: 0004-netty-to-4.1.89.patch -Patch0005: 0005-cve-2023-34455.patch -Patch0006: 0006-fix-memory-leak.patch -Patch0007: 0007-CVE-2022-1471.patch -Patch0008: 0008-CVE-2023-26048.patch -Patch0009: 0009-CVE-2022-24329.patch -Patch0010: 0010-CVE-2022-22970.patch -Patch0011: 0011-CVE-2023-25194.patch -Patch0012: 0012-CVE-2023-2976.patch -Patch0013: 0013-fix-deadlock.patch -Patch0014: 0014-CVE-2023-32732.patch -Patch0015: 0015-fix-no-messages.patch -Patch0016: 0016-handle-exception.patch -Patch0017: 0017-return-earliest-position.patch -Patch0018: 0018-return-when-AbstractDispatcherSingleActiveConsumer-closed.patch -Patch0019: 0019-clean-inactive-bundle.patch BuildRoot: /root/rpmbuild/BUILDROOT/ BuildRequires: java-1.8.0-openjdk-devel,maven,systemd Requires: java-1.8.0-openjdk,systemd @@ -42,24 +24,6 @@ Pulsar is a distributed pub-sub messaging platform with a very flexible messagin %setup -q -n apache-pulsar-%{version}-src %patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 -%patch0004 -p1 -%patch0005 -p1 -%patch0006 -p1 -%patch0007 -p1 -%patch0008 -p1 -%patch0009 -p1 -%patch0010 -p1 -%patch0011 -p1 -%patch0012 -p1 -%patch0013 -p1 -%patch0014 -p1 -%patch0015 -p1 -%patch0016 -p1 -%patch0017 -p1 -%patch0018 -p1 -%patch0019 -p1 %build mvn clean install -Pcore-modules,-main -DskipTests @@ -85,6 +49,9 @@ getent passwd pulsar >/dev/null || useradd -r -g pulsar -d / -s /sbin/nologin pu exit 0 %changelog +* Sun Apr 28 2024 dongjiao - 2.10.6-1 +- update to 2.10.6 + * Fri Dec 8 2023 Dapeng Sun - 2.10.4-19 - clean inactive bundle from bundleData in loadData and bundlesCache * Fri Dec 8 2023 Dapeng Sun - 2.10.4-18