[Transaction] Fix transaction system topic create in loop.#12749
Conversation
|
|
||
| public static boolean isNotAllowedToCreateTopic(TopicName topicName) { | ||
| String topic = topicName.toString(); | ||
| return topic.startsWith(TopicName.get(TopicDomain.persistent.value(), |
There was a problem hiding this comment.
what about creating a constant for this ? "TopicName.get(TopicDomain.persistent.value(), NamespaceName.SYSTEM_NAMESPACE, TRANSACTION_LOG_PREFIX).toString()"
| } | ||
| } | ||
|
|
||
| protected void validateTopicAllowdToCreate(TopicName topicName) { |
There was a problem hiding this comment.
typo: validateCreateTopic
|
Can you add my reproducer as a test case ? I am not sure that we will really fix the problem. Because we are not forbidding to create a topic with a system name. |
eolivelli
left a comment
There was a problem hiding this comment.
I left one last minor comment.
| || topic.endsWith(MLPendingAckStore.PENDING_ACK_STORE_SUFFIX); | ||
| } | ||
|
|
||
| public static boolean isNotAllowedToCreateTopic(TopicName topicName) { |
There was a problem hiding this comment.
what about naming this method isTransactionInternalName ?
the meaning is that this is a reserved name
I see that you are using this method while listing the topic names, so "Create" is not good in that place
…ate_transaction_system_topic
|
Confirmed w/ @codelipenghui, this PR is a bug fix, no need to update docs. |
) fix apache#12727 ### Motivation Now transaction system topic can be created. ### Modifications we should not allow broker or user create by transaction system format topic. 1. checkout topic auto create. 2. admin create topic. ### Verifying this change add some test for it
fix #12727 ### Motivation Now transaction system topic can be created. ### Modifications we should not allow broker or user create by transaction system format topic. 1. checkout topic auto create. 2. admin create topic. ### Verifying this change add some test for it (cherry picked from commit 2c4d913)
fix #12727
Motivation
Now transaction system topic can be created.
Modifications
we should not allow broker or user create by transaction system format topic.
Verifying this change
add some test for it