Skip to content

[fix] producer do not create when topic update partition#295

Merged
BewareMyPower merged 2 commits into
apache:mainfrom
TakaHiR07:fix_can_not_update_producer_partition
Jul 1, 2023
Merged

[fix] producer do not create when topic update partition#295
BewareMyPower merged 2 commits into
apache:mainfrom
TakaHiR07:fix_can_not_update_producer_partition

Conversation

@TakaHiR07
Copy link
Copy Markdown
Contributor

@TakaHiR07 TakaHiR07 commented Jun 29, 2023

Motivation

When topic update partition, new producer is not created on the new partition. The root is runPartitionUpdateTask not work well.

Modifications

runPartitionUpdateTask should be executed next time when partition not updated.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc-not-needed
    (Please explain why)

Copy link
Copy Markdown
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to add a test. The current logic is protected by https://github.com/apache/pulsar-client-cpp/blob/main/tests/PartitionsUpdateTest.cc

@TakaHiR07
Copy link
Copy Markdown
Contributor Author

TakaHiR07 commented Jun 30, 2023

It's better to add a test. The current logic is protected by https://github.com/apache/pulsar-client-cpp/blob/main/tests/PartitionsUpdateTest.cc

I have improved PartitionsUpdateTest to verify the problem and fix.

@BewareMyPower BewareMyPower added the bug Something isn't working label Jun 30, 2023
@BewareMyPower BewareMyPower added this to the 3.3.0 milestone Jun 30, 2023
@liuhongtong
Copy link
Copy Markdown

nice fix.

Copy link
Copy Markdown
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@BewareMyPower
Copy link
Copy Markdown
Contributor

It might also fix #50, which was closed due to no reproduce code.

@BewareMyPower BewareMyPower merged commit 804f87b into apache:main Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants