Skip to content

Conversation

@poorbarcode
Copy link
Contributor

Motivation

To reproduce the issue:

  • Create a partitioned topic with 2 partitions
  • All partitions are deleted because the feature brokerDeleteInactiveTopicsEnabled is true
  • Try to get the topic-level policies; you will get a Topic not found error

The master branch does not have the issue because #24225 have fixed it here

Modifications

fix the issue

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 4.1.0 milestone Aug 28, 2025
@poorbarcode poorbarcode self-assigned this Aug 28, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 28, 2025
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@lhotari
Copy link
Member

lhotari commented Aug 28, 2025

@poorbarcode I merged origin/branch-4.0 and fixed checkstyle, but there seems to be remaining issues:

[ERROR] Failures:
[ERROR] org.apache.pulsar.client.api.PartitionCreationTest.testCreateConsumerForPartitionedTopicUpdateWhenDisableTopicAutoCreation
[INFO]   Run 1: PASS
[ERROR]   Run 2: PartitionCreationTest.testCreateConsumerForPartitionedTopicUpdateWhenDisableTopicAutoCreation:126 » Conflict This topic already exists
[INFO]
[ERROR]   PartitionCreationTest.testCreateConsumerForPartitionedTopicWhenDisableTopicAutoCreation:65 » Conflict This topic already exists
[ERROR]   PartitionCreationTest.testCreateConsumerForPartitionedTopicWhenDisableTopicAutoCreation:65 » Conflict This topic already exists
[ERROR]   PartitionCreationTest.testCreateConsumerForPartitionedTopicWhenEnableTopicAutoCreation:94 » Conflict This topic already exists
[ERROR]   PartitionCreationTest.testCreateConsumerForPartitionedTopicWhenEnableTopicAutoCreation:94 » Conflict This topic already exists
[ERROR]   PartitionCreationTest.testCreateMissedPartitions:161 expected [null] but found [ConsumerBase{subscription='sub-1', consumerName='BIQ3d', topic='testCreateMissedPartitions-useRestApi-false'}]
[ERROR]   PartitionCreationTest.testCreateMissedPartitions:161 expected [null] but found [ConsumerBase{subscription='sub-1', consumerName='Yn4Sn', topic='testCreateMissedPartitions-useRestApi-true'}]
[INFO]
[ERROR] Tests run: 18, Failures: 7, Errors: 0, Skipped: 6

Regarding checkstyle, I recommend to configure IntelliJ with the checkstyle plugin and Pulsar codestyle as explained in https://pulsar.apache.org/contribute/setup-ide/#configure-checkstyle since it will help avoid checkstyle errors.

Before pushing, it's useful to compile and run checkstyle, this is very quick:

mvn -Pcore-modules,-main -T 1C clean install -DskipTests -Dspotbugs.skip=true -DnarPluginPhase=none

to just run license check and checkstyle for all modules, this is the go to command:

mvn -T 1C initialize license:check checkstyle:check

this runs very quickly for the complete project (< 10 seconds on my laptop). Creating shell aliases for these commands is helpful.

@poorbarcode poorbarcode force-pushed the 4_0/testGetPoliciesIfPartitionsNotCreated branch from f0a7919 to 97f88c9 Compare August 29, 2025 08:03
@coderzc coderzc modified the milestones: 4.1.0, 4.2.0 Sep 1, 2025
@Technoboy- Technoboy- merged commit 109ba07 into apache:branch-4.0 Sep 1, 2025
99 of 101 checks passed
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Sep 10, 2025
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 11, 2025
…tions have not been created (apache#24680)

(cherry picked from commit 109ba07)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Sep 12, 2025
…tions have not been created (apache#24680)

(cherry picked from commit 109ba07)
nborisov pushed a commit to nborisov/pulsar that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test release/4.0.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants