Skip to content

Conversation

@poorbarcode
Copy link
Contributor

Motivation

The reproduction steps of the issue

  • Create a partitioned topic with 2 partitions
  • A partition was deleted due to the feature brokerDeleteInactiveTopicsMode
  • Issue: the topic's policies were deleted, even though the partitioned topic still exists

Modifications

  • Do not delete topic policies when a sub topic is deleting
  • Delete topic-level poclies when a non-partitioned topic is deleting or a partitioned topic is deleting

Documentation

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

Matching PR in forked repository

PR in forked repository: x

…opic deleted, but partitioned topic still exist
@poorbarcode poorbarcode requested review from gaoran10, lhotari and shibd May 27, 2025 09:45
@poorbarcode poorbarcode self-assigned this May 27, 2025
@poorbarcode poorbarcode added type/bug The PR fixed a bug or issue reported a bug release/3.0.13 release/4.0.6 release/3.3.8 labels May 27, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 27, 2025
@liangyepianzhou liangyepianzhou added this to the 4.1.0 milestone May 27, 2025
Copy link
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.

Could it be fixed by enabling brokerDeleteInactivePartitionedTopicMetadataEnabled ? I opened a similar issue before: #10975

@poorbarcode poorbarcode changed the title [fix][broker] FIx issue that topic policies was deleted after a sub topic deleted, but partitioned topic still exists [fix][broker] FIx issue that topic policies was deleted after a sub topic deleted, even if the partitioned topic still exists May 27, 2025
@poorbarcode
Copy link
Contributor Author

@BewareMyPower

Could it be fixed by enabling brokerDeleteInactivePartitionedTopicMetadataEnabled ? I opened a similar issue before: #10975

They are different issues, see the details in this PR's motivation

@poorbarcode poorbarcode requested a review from BewareMyPower May 27, 2025 15:10
@BewareMyPower BewareMyPower changed the title [fix][broker] FIx issue that topic policies was deleted after a sub topic deleted, even if the partitioned topic still exists [fix][broker] Fix issue that topic policies was deleted after a sub topic deleted, even if the partitioned topic still exists May 28, 2025
@BewareMyPower
Copy link
Contributor

Oh I see, it's the topic policies are deleted

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@lhotari
Copy link
Member

lhotari commented May 30, 2025

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.27%. Comparing base (bbc6224) to head (ae8e9ac).
⚠️ Report is 1311 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24350      +/-   ##
============================================
+ Coverage     73.57%   74.27%   +0.69%     
- Complexity    32624    32650      +26     
============================================
  Files          1877     1866      -11     
  Lines        139502   145149    +5647     
  Branches      15299    16597    +1298     
============================================
+ Hits         102638   107808    +5170     
+ Misses        28908    28812      -96     
- Partials       7956     8529     +573     
Flag Coverage Δ
inttests 26.61% <0.00%> (+2.03%) ⬆️
systests 23.24% <81.81%> (-1.08%) ⬇️
unittests 73.76% <100.00%> (+0.92%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...pulsar/broker/admin/impl/PersistentTopicsBase.java 70.32% <100.00%> (+4.86%) ⬆️
...rg/apache/pulsar/broker/service/AbstractTopic.java 88.04% <100.00%> (+0.06%) ⬆️
...rg/apache/pulsar/broker/service/BrokerService.java 84.09% <100.00%> (+3.31%) ⬆️

... and 1085 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lhotari lhotari merged commit 8db6a3b into apache:master May 30, 2025
62 checks passed
lhotari pushed a commit that referenced this pull request Jun 2, 2025
…opic deleted, even if the partitioned topic still exists (#24350)

(cherry picked from commit 8db6a3b)
@lhotari
Copy link
Member

lhotari commented Jun 2, 2025

@poorbarcode Please handle cherry-picking to branch-3.0 and branch-3.3 since there are merge conflicts that I'm not confident of resolving. After resolving merge conflicts, make sure that the branch builds cleanly and the checkstyle checks pass.

This is a quick check

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

I've recently pushed a75d16f to fix some previous checkstyle errors from previous cherry-picks.

manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 4, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 821c2fd)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 5, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 821c2fd)
poorbarcode added a commit that referenced this pull request Jun 10, 2025
…opic deleted, even if the partitioned topic still exists (#24350)

(cherry picked from commit 8db6a3b)
poorbarcode added a commit that referenced this pull request Jun 10, 2025
…opic deleted, even if the partitioned topic still exists (#24350)

(cherry picked from commit 8db6a3b)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 12, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 0650d92)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 13, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 0650d92)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 14, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 0650d92)
(cherry picked from commit d012231)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 16, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
(cherry picked from commit 0650d92)
(cherry picked from commit d012231)
nodece pushed a commit to nodece/pulsar that referenced this pull request Jun 18, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)

(cherry picked from commit 8db6a3b)
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
…opic deleted, even if the partitioned topic still exists (apache#24350)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants