-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Fix can not delete namespace by force #18307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3eee361
82610fd
0125443
dffda40
9b91947
6815556
a5ef7a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,35 +89,6 @@ public void produceAndCommitTest() throws Exception { | |
| produceTest(true); | ||
| } | ||
|
|
||
| @Test | ||
| public void testDeleteNamespaceBeforeCommit() throws Exception { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we should delete the entire test?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is strange. The expected behavior is the namespace can be deleted by force when |
||
| final String topic = NAMESPACE1 + "/testDeleteTopicBeforeCommit"; | ||
| PulsarClient pulsarClient = this.pulsarClient; | ||
| Transaction tnx = pulsarClient.newTransaction() | ||
| .withTransactionTimeout(60, TimeUnit.SECONDS) | ||
| .build().get(); | ||
| long txnIdMostBits = ((TransactionImpl) tnx).getTxnIdMostBits(); | ||
| long txnIdLeastBits = ((TransactionImpl) tnx).getTxnIdLeastBits(); | ||
| Assert.assertTrue(txnIdMostBits > -1); | ||
| Assert.assertTrue(txnIdLeastBits > -1); | ||
|
|
||
| @Cleanup | ||
| Producer<byte[]> outProducer = pulsarClient | ||
| .newProducer() | ||
| .topic(topic) | ||
| .sendTimeout(0, TimeUnit.SECONDS) | ||
| .enableBatching(false) | ||
| .create(); | ||
|
|
||
| String content = "Hello Txn"; | ||
| outProducer.newMessage(tnx).value(content.getBytes(UTF_8)).send(); | ||
|
|
||
| try { | ||
| deleteNamespaceGraceFully(NAMESPACE1, true); | ||
| } catch (Exception ignore) {} | ||
| tnx.commit().get(); | ||
| } | ||
|
|
||
| @Test | ||
| public void produceAndAbortTest() throws Exception { | ||
| produceTest(false); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.