You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2025/04/30 10:06:25 UTC
(pulsar) branch branch-3.3 updated (6a700172d69 -> e099f3af0b7)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a change to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git
from 6a700172d69 [fix][broker] Orphan schema after disabled a cluster for a namespace (#24223)
new 55edd4e90ee [improve][client]Improve transaction log when a TXN command timeout (#24230)
new e099f3af0b7 [fix][sec] Upgrade Jetty to 9.4.57.v20241219 to mitigate CVE-2024-6763 (#24232)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
distribution/server/src/assemble/LICENSE.bin.txt | 38 +++++++++----------
distribution/shell/src/assemble/LICENSE.bin.txt | 16 ++++----
pom.xml | 2 +-
.../client/impl/TransactionMetaStoreHandler.java | 44 ++++++++++++++++++----
4 files changed, 65 insertions(+), 35 deletions(-)
(pulsar) 01/02: [improve][client]Improve transaction log when a TXN command timeout (#24230)
Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 55edd4e90ee3049752871283889f82efbf984687
Author: fengyubiao <yu...@streamnative.io>
AuthorDate: Wed Apr 30 14:33:57 2025 +0800
[improve][client]Improve transaction log when a TXN command timeout (#24230)
(cherry picked from commit 74c3b577c7c78a5f9d72fa28c99db72dda4460b7)
---
.../client/impl/TransactionMetaStoreHandler.java | 44 ++++++++++++++++++----
1 file changed, 37 insertions(+), 7 deletions(-)
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TransactionMetaStoreHandler.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TransactionMetaStoreHandler.java
index e45d5397115..245e64f12c2 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TransactionMetaStoreHandler.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TransactionMetaStoreHandler.java
@@ -234,7 +234,8 @@ public class TransactionMetaStoreHandler extends HandlerState
}
long requestId = client.newRequestId();
ByteBuf cmd = Commands.newTxn(transactionCoordinatorId, requestId, unit.toMillis(timeout));
- OpForTxnIdCallBack op = OpForTxnIdCallBack.create(cmd, callback, client);
+ String description = String.format("Create new transaction %s", transactionCoordinatorId);
+ OpForTxnIdCallBack op = OpForTxnIdCallBack.create(cmd, callback, client, description, cnx());
internalPinnedExecutor.execute(() -> {
pendingRequests.put(requestId, op);
timeoutQueue.add(new RequestTime(System.currentTimeMillis(), requestId));
@@ -315,8 +316,10 @@ public class TransactionMetaStoreHandler extends HandlerState
long requestId = client.newRequestId();
ByteBuf cmd = Commands.newAddPartitionToTxn(
requestId, txnID.getLeastSigBits(), txnID.getMostSigBits(), partitions);
+ String description = String.format("Add partition %s to TXN %s", String.valueOf(partitions),
+ String.valueOf(txnID));
OpForVoidCallBack op = OpForVoidCallBack
- .create(cmd, callback, client);
+ .create(cmd, callback, client, description, cnx());
internalPinnedExecutor.execute(() -> {
pendingRequests.put(requestId, op);
timeoutQueue.add(new RequestTime(System.currentTimeMillis(), requestId));
@@ -400,7 +403,9 @@ public class TransactionMetaStoreHandler extends HandlerState
long requestId = client.newRequestId();
ByteBuf cmd = Commands.newAddSubscriptionToTxn(
requestId, txnID.getLeastSigBits(), txnID.getMostSigBits(), subscriptionList);
- OpForVoidCallBack op = OpForVoidCallBack.create(cmd, callback, client);
+ String description = String.format("Add subscription %s to TXN %s", toStringSubscriptionList(subscriptionList),
+ String.valueOf(txnID));
+ OpForVoidCallBack op = OpForVoidCallBack.create(cmd, callback, client, description, cnx());
internalPinnedExecutor.execute(() -> {
pendingRequests.put(requestId, op);
timeoutQueue.add(new RequestTime(System.currentTimeMillis(), requestId));
@@ -411,6 +416,17 @@ public class TransactionMetaStoreHandler extends HandlerState
return callback;
}
+ private String toStringSubscriptionList(List<Subscription> list) {
+ if (list == null || list.isEmpty()) {
+ return "[]";
+ }
+ StringBuilder builder = new StringBuilder("[");
+ for (Subscription subscription : list) {
+ builder.append(String.format("%s %s", subscription.getTopic(), subscription.getSubscription()));
+ }
+ return builder.append("]").toString();
+ }
+
public void handleAddSubscriptionToTxnResponse(CommandAddSubscriptionToTxnResponse response) {
final boolean hasError = response.hasError();
final ServerError error;
@@ -482,7 +498,8 @@ public class TransactionMetaStoreHandler extends HandlerState
long requestId = client.newRequestId();
BaseCommand cmd = Commands.newEndTxn(requestId, txnID.getLeastSigBits(), txnID.getMostSigBits(), action);
ByteBuf buf = Commands.serializeWithSize(cmd);
- OpForVoidCallBack op = OpForVoidCallBack.create(buf, callback, client);
+ String description = String.format("End [%s] TXN %s", String.valueOf(action), String.valueOf(txnID));
+ OpForVoidCallBack op = OpForVoidCallBack.create(buf, callback, client, description, cnx());
internalPinnedExecutor.execute(() -> {
pendingRequests.put(requestId, op);
timeoutQueue.add(new RequestTime(System.currentTimeMillis(), requestId));
@@ -572,13 +589,16 @@ public class TransactionMetaStoreHandler extends HandlerState
protected ByteBuf cmd;
protected CompletableFuture<T> callback;
protected Backoff backoff;
+ protected String description;
+ protected ClientCnx clientCnx;
abstract void recycle();
}
private static class OpForTxnIdCallBack extends OpBase<TxnID> {
- static OpForTxnIdCallBack create(ByteBuf cmd, CompletableFuture<TxnID> callback, PulsarClientImpl client) {
+ static OpForTxnIdCallBack create(ByteBuf cmd, CompletableFuture<TxnID> callback, PulsarClientImpl client,
+ String description, ClientCnx clientCnx) {
OpForTxnIdCallBack op = RECYCLER.get();
op.callback = callback;
op.cmd = cmd;
@@ -588,6 +608,8 @@ public class TransactionMetaStoreHandler extends HandlerState
.setMax(client.getConfiguration().getMaxBackoffIntervalNanos() / 10, TimeUnit.NANOSECONDS)
.setMandatoryStop(0, TimeUnit.MILLISECONDS)
.create();
+ op.description = description;
+ op.clientCnx = clientCnx;
return op;
}
@@ -600,6 +622,8 @@ public class TransactionMetaStoreHandler extends HandlerState
this.backoff = null;
this.cmd = null;
this.callback = null;
+ this.description = null;
+ this.clientCnx = null;
recyclerHandle.recycle(this);
}
@@ -615,7 +639,8 @@ public class TransactionMetaStoreHandler extends HandlerState
private static class OpForVoidCallBack extends OpBase<Void> {
- static OpForVoidCallBack create(ByteBuf cmd, CompletableFuture<Void> callback, PulsarClientImpl client) {
+ static OpForVoidCallBack create(ByteBuf cmd, CompletableFuture<Void> callback, PulsarClientImpl client,
+ String description, ClientCnx clientCnx) {
OpForVoidCallBack op = RECYCLER.get();
op.callback = callback;
op.cmd = cmd;
@@ -625,6 +650,8 @@ public class TransactionMetaStoreHandler extends HandlerState
.setMax(client.getConfiguration().getMaxBackoffIntervalNanos() / 10, TimeUnit.NANOSECONDS)
.setMandatoryStop(0, TimeUnit.MILLISECONDS)
.create();
+ op.description = description;
+ op.clientCnx = clientCnx;
return op;
}
@@ -637,6 +664,8 @@ public class TransactionMetaStoreHandler extends HandlerState
this.backoff = null;
this.cmd = null;
this.callback = null;
+ this.description = null;
+ this.clientCnx = null;
recyclerHandle.recycle(this);
}
@@ -744,7 +773,8 @@ public class TransactionMetaStoreHandler extends HandlerState
OpBase<?> op = pendingRequests.remove(lastPolled.requestId);
if (op != null && !op.callback.isDone()) {
op.callback.completeExceptionally(new PulsarClientException.TimeoutException(
- "Could not get response from transaction meta store within given timeout."));
+ String.format("%s failed due to timeout. connection: %s. pending-queue: %s",
+ op.description, op.clientCnx, pendingRequests.size())));
if (LOG.isDebugEnabled()) {
LOG.debug("Transaction coordinator request {} is timeout.", lastPolled.requestId);
}
(pulsar) 02/02: [fix][sec] Upgrade Jetty to 9.4.57.v20241219 to mitigate CVE-2024-6763 (#24232)
Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit e099f3af0b7ad27740644d0374cbb8ee8cd3d07e
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Wed Apr 30 11:53:26 2025 +0300
[fix][sec] Upgrade Jetty to 9.4.57.v20241219 to mitigate CVE-2024-6763 (#24232)
(cherry picked from commit 611dc3f360b5c14fd95eeb36b50948115da2bada)
---
distribution/server/src/assemble/LICENSE.bin.txt | 38 ++++++++++++------------
distribution/shell/src/assemble/LICENSE.bin.txt | 16 +++++-----
pom.xml | 2 +-
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt
index 56b3e07c33b..3b3a964db0b 100644
--- a/distribution/server/src/assemble/LICENSE.bin.txt
+++ b/distribution/server/src/assemble/LICENSE.bin.txt
@@ -392,25 +392,25 @@ The Apache Software License, Version 2.0
- org.asynchttpclient-async-http-client-2.12.4.jar
- org.asynchttpclient-async-http-client-netty-utils-2.12.4.jar
* Jetty
- - org.eclipse.jetty-jetty-client-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-continuation-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-http-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-io-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-proxy-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-security-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-server-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-servlet-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-servlets-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-util-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-util-ajax-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-javax-websocket-client-impl-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-websocket-api-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-websocket-client-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-websocket-common-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-websocket-server-9.4.56.v20240826.jar
- - org.eclipse.jetty.websocket-websocket-servlet-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-alpn-conscrypt-server-9.4.56.v20240826.jar
- - org.eclipse.jetty-jetty-alpn-server-9.4.56.v20240826.jar
+ - org.eclipse.jetty-jetty-client-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-continuation-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-http-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-io-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-proxy-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-security-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-server-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-servlet-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-servlets-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-util-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-util-ajax-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-javax-websocket-client-impl-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-websocket-api-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-websocket-client-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-websocket-common-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-websocket-server-9.4.57.v20241219.jar
+ - org.eclipse.jetty.websocket-websocket-servlet-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-alpn-conscrypt-server-9.4.57.v20241219.jar
+ - org.eclipse.jetty-jetty-alpn-server-9.4.57.v20241219.jar
* SnakeYaml -- org.yaml-snakeyaml-2.0.jar
* RocksDB - org.rocksdb-rocksdbjni-7.9.2.jar
* Google Error Prone Annotations - com.google.errorprone-error_prone_annotations-2.24.0.jar
diff --git a/distribution/shell/src/assemble/LICENSE.bin.txt b/distribution/shell/src/assemble/LICENSE.bin.txt
index d7bf0ca3b89..93cfb805046 100644
--- a/distribution/shell/src/assemble/LICENSE.bin.txt
+++ b/distribution/shell/src/assemble/LICENSE.bin.txt
@@ -402,14 +402,14 @@ The Apache Software License, Version 2.0
- async-http-client-2.12.4.jar
- async-http-client-netty-utils-2.12.4.jar
* Jetty
- - jetty-client-9.4.56.v20240826.jar
- - jetty-http-9.4.56.v20240826.jar
- - jetty-io-9.4.56.v20240826.jar
- - jetty-util-9.4.56.v20240826.jar
- - javax-websocket-client-impl-9.4.56.v20240826.jar
- - websocket-api-9.4.56.v20240826.jar
- - websocket-client-9.4.56.v20240826.jar
- - websocket-common-9.4.56.v20240826.jar
+ - jetty-client-9.4.57.v20241219.jar
+ - jetty-http-9.4.57.v20241219.jar
+ - jetty-io-9.4.57.v20241219.jar
+ - jetty-util-9.4.57.v20241219.jar
+ - javax-websocket-client-impl-9.4.57.v20241219.jar
+ - websocket-api-9.4.57.v20241219.jar
+ - websocket-client-9.4.57.v20241219.jar
+ - websocket-common-9.4.57.v20241219.jar
* SnakeYaml -- snakeyaml-2.0.jar
* Google Error Prone Annotations - error_prone_annotations-2.24.0.jar
* Javassist -- javassist-3.25.0-GA.jar
diff --git a/pom.xml b/pom.xml
index a1142bede43..fc4b2989412 100644
--- a/pom.xml
+++ b/pom.xml
@@ -146,7 +146,7 @@ flexible messaging model and an intuitive client API.</description>
<curator.version>5.7.1</curator.version>
<netty.version>4.1.121.Final</netty.version>
<netty-iouring.version>0.0.26.Final</netty-iouring.version>
- <jetty.version>9.4.56.v20240826</jetty.version>
+ <jetty.version>9.4.57.v20241219</jetty.version>
<conscrypt.version>2.5.2</conscrypt.version>
<jersey.version>2.42</jersey.version>
<athenz.version>1.10.50</athenz.version>