forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[run-tests] [fix][broker] Topic could be in fenced state forever if deletion fails #46
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apache#18943) ### Motivation when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck. https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115 ### Modifications when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`; when pendingAckStore init fail, close pendingAckHandle success directly ### Verifying this change mock get managedLeger config throw exception, then unload can success
apache#15347) Signed-off-by: Zixuan Liu <[email protected]>
…ting it to the topic (apache#18913)
…8975) ### Motivation fix multi invocation for ledger `createComplete` ### Modifications Only call `createComplete` at the point of creating ledger timeout if the ledger is not created normally
…d timeout in listener (apache#18911)
…essage if enabled read compacted (apache#18877) ### Motivation The method `consumer.getLastMessageId` will return the latest message which can be received. - If disabled `read compacted`, will return the last confirmed position of `ManagedLedger`. - If enabled `read compacted`, will return the latest message id which can be read from the compacted topic. If we send a batch message like this: ```java producer.newMessage().key("k1").value("v0").sendAsync(); // message-id is [3:1,-1:0] producer.newMessage().key("k1").value("v1").sendAsync(); // message-id is [3:1,-1:1] producer.newMessage().key("k1").value("v2").sendAsync(); // message-id is [3:1,-1:2] producer.newMessage().key("k2").value("v0").sendAsync(); // message-id is [3:1,-1:3] producer.newMessage().key("k2").value("v1").sendAsync(); // message-id is [3:1,-1:4] producer.newMessage().key("k2").value(null).sendAsync(); // message-id is [3:1,-1:5] producer.flush(); ``` After the compaction task is done, the messages with key `k2` will be deleted by the compaction task. Then the latest message that can be received will be `[3:1:-1:2]`. --- When we call `consumer.getLastMessageId`, the expected result is: ``` [3:1,-1:2] ``` --- But the actual result is: ``` [3:1,-1:5] ``` ### Modifications If enabled `read compacted` and the latest entry of the compacted topic is a batched message, extract the entry and calculate all internal messages, then return the latest message which is not marked `compacted out`.
…rCnx (apache#18987) ### Motivation In the `PulsarDecoder`, we use a single `BaseCommand` object and overwrite it for each incoming protocol message. As a result, it is not safe to publish any references to a proto command to other threads. Here is the single `BaseCommand`: https://github.com/apache/pulsar/blob/82237d3684fe506bcb6426b3b23f413422e6e4fb/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java#L99 Here is the method call that resets the object: https://github.com/apache/pulsar/blob/82237d3684fe506bcb6426b3b23f413422e6e4fb/pulsar-common/src/main/java/org/apache/pulsar/common/protocol/PulsarDecoder.java#L114 Note that the call to `parseFrom` first calls `clear()`, which resets all values on the object. This PR copies relevant values or objects into other variables. ### Modifications * Replace `command` with `tcId` since the latter is a final variable meant to be published to another thread. * Move logic to copy certain command fields to earlier in method for `handleSubscribe` * Copy `ack` object to new `CommandAck` when there is a broker interceptor. Note that copying this command is likely somewhat costly, so we only do it when there is an interceptor configured. ### Verifying this change This is a trivial change that is already covered by tests. ### Documentation - [x] `doc-not-needed` This is an internal change. ### Matching PR in forked repository PR in forked repository: michaeljmarshall#8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is for running tests for upstream PR apache#19129.