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 2024/12/21 16:55:48 UTC
(pulsar) branch branch-3.3 updated (cedc45521ee -> 645d31810ee)
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 cedc45521ee [fix] Fix issues with Pulsar Alpine docker image stability: remove glibc-compat (#23762)
new 15550426dae [fix][admin] Fix exception loss in getMessageId method (#23766)
new 645d31810ee [fix][broker] System topic should not be migrated during blue-green cluster migration (#23767)
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:
.../org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java | 7 ++++---
.../main/java/org/apache/pulsar/broker/service/BrokerService.java | 4 +++-
.../apache/pulsar/broker/service/persistent/PersistentTopic.java | 5 ++++-
.../java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java | 4 ++++
4 files changed, 15 insertions(+), 5 deletions(-)
(pulsar) 01/02: [fix][admin] Fix exception loss in getMessageId method (#23766)
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 15550426daef1eaa72b3114c686a96523372b1e3
Author: danpi <da...@gmail.com>
AuthorDate: Sat Dec 21 19:20:56 2024 +0800
[fix][admin] Fix exception loss in getMessageId method (#23766)
Co-authored-by: houbonan <ho...@didiglobal.com>
(cherry picked from commit 3d505742e05e403144d17aef59c95e2758982a26)
---
.../org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java | 7 ++++---
.../java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java | 4 ++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
index 58a86f1a40f..5fa4b582e3b 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
@@ -2762,9 +2762,10 @@ public class PersistentTopicsBase extends AdminResource {
public void readEntryFailed(ManagedLedgerException exception,
Object ctx) {
if (exception instanceof ManagedLedgerException.LedgerNotExistException) {
- throw new RestException(Status.NOT_FOUND, "Message id not found");
+ results.completeExceptionally(
+ new RestException(Status.NOT_FOUND, "Message id not found"));
}
- throw new RestException(exception);
+ results.completeExceptionally(new RestException(exception));
}
@Override
@@ -2772,7 +2773,7 @@ public class PersistentTopicsBase extends AdminResource {
try {
results.complete(generateResponseWithEntry(entry, (PersistentTopic) topic));
} catch (IOException exception) {
- throw new RestException(exception);
+ results.completeExceptionally(new RestException(exception));
} finally {
if (entry != null) {
entry.release();
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java
index bf3b2706697..d5c2bbfbdf2 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/PersistentTopicsTest.java
@@ -1389,6 +1389,10 @@ public class PersistentTopicsTest extends MockedPulsarServiceBaseTest {
Assert.expectThrows(PulsarAdminException.NotFoundException.class, () -> {
admin.topics().getMessageById(topicName1, id2.getLedgerId(), id2.getEntryId());
});
+
+ Assert.expectThrows(PulsarAdminException.ServerSideErrorException.class, () -> {
+ admin.topics().getMessageById(topicName1, id1.getLedgerId(), id1.getEntryId() + 10);
+ });
}
@Test
(pulsar) 02/02: [fix][broker] System topic should not be migrated during blue-green cluster migration (#23767)
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 645d31810ee03099d1bd08111cf312bbae520dc4
Author: hrzzzz <64...@users.noreply.github.com>
AuthorDate: Sat Dec 21 21:32:32 2024 +0800
[fix][broker] System topic should not be migrated during blue-green cluster migration (#23767)
Co-authored-by: ruihongzhou <ru...@tencent.com>
(cherry picked from commit 1967a9309586286580ac0f3b75a34e1f70e63f75)
---
.../main/java/org/apache/pulsar/broker/service/BrokerService.java | 4 +++-
.../org/apache/pulsar/broker/service/persistent/PersistentTopic.java | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
index 03484b58726..3977c2ba2b2 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
@@ -1828,7 +1828,9 @@ public class BrokerService implements Closeable {
}
private CompletableFuture<Void> checkTopicAlreadyMigrated(TopicName topicName) {
- if (ExtensibleLoadManagerImpl.isInternalTopic(topicName.toString())) {
+ if (ExtensibleLoadManagerImpl.isInternalTopic(topicName.toString())
+ || SystemTopicNames.isEventSystemTopic(topicName)
+ || NamespaceService.isHeartbeatNamespace(topicName.getNamespaceObject())) {
return CompletableFuture.completedFuture(null);
}
CompletableFuture<Void> result = new CompletableFuture<>();
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
index d0f2788c9c5..20bdbe4effc 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
@@ -3002,7 +3002,10 @@ public class PersistentTopic extends AbstractTopic implements Topic, AddEntryCal
@Override
public CompletableFuture<Void> checkClusterMigration() {
- if (ExtensibleLoadManagerImpl.isInternalTopic(topic)) {
+ TopicName topicName = TopicName.get(topic);
+ if (ExtensibleLoadManagerImpl.isInternalTopic(topic)
+ || isEventSystemTopic(topicName)
+ || NamespaceService.isHeartbeatNamespace(topicName.getNamespaceObject())) {
return CompletableFuture.completedFuture(null);
}