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
[Transaction] Fix topicTransactionBuffer handle null snapshot #12758
[Transaction] Fix topicTransactionBuffer handle null snapshot #12758
Conversation
@congbobo184:Thanks for your contribution. For this PR, do we need to update docs? |
@congbobo184:Thanks for your contribution. For this PR, do we need to update docs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Message<TransactionBufferSnapshot> message = reader.readNext(); | ||
TransactionBufferSnapshot transactionBufferSnapshot = message.getValue(); | ||
if (topic.getName().equals(transactionBufferSnapshot.getTopicName())) { | ||
if (transactionBufferSnapshot != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the key of the message to verify the message belong to this topic? This may reduce some deserialization works.
This patch actually fixes my issue, thank you very much ! |
…#12758) fix apache#12754 ### Motivation Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE ### Modifications judge NPE logic
…#12758) fix apache#12754 Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE judge NPE logic (cherry picked from commit c90c89b)
…#12758) fix apache#12754 Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE judge NPE logic (cherry picked from commit c90c89b)
…#12758) fix apache#12754 Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE judge NPE logic (cherry picked from commit c90c89b)
…#12758) fix apache#12754 Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE judge NPE logic (cherry picked from commit c90c89b) (cherry picked from commit 75cec6d)
fix #12754
Motivation
Now when delete topic, we will write a null value to Transaction buffer snapshot topic, other topic recover by this transaction buffer snapshot system topic, will produce NPE
Modifications
judge NPE logic
Verifying this change
add some test for it