Skip to content
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

fix the race of delete subscription and delete topic #12240

Merged
merged 3 commits into from
Oct 25, 2021

Conversation

shoothzj
Copy link
Member

@shoothzj shoothzj commented Sep 29, 2021

Fixes #12239

Motivation

See #12239

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

Use writelock to make deletecursor and remove subscription from map atomicly to method deleteTopic

After discuessed with penghui and chenhang, we if deleteTopic found the subscritpion has been removed, let it paas

Documentation

Need to update docs?

  • no-need-doc

Bug fix, no need doc

@shoothzj
Copy link
Member Author

@codelipenghui could you please review this modification, and give me some idea to add tests.
Thank you :)

@hangc0276 hangc0276 added area/broker release/2.8.2 type/bug The PR fixed a bug or issue reported a bug labels Oct 9, 2021
@codelipenghui codelipenghui removed type/bug The PR fixed a bug or issue reported a bug area/broker labels Oct 9, 2021
@codelipenghui codelipenghui added this to the 2.10.0 milestone Oct 9, 2021
@hangc0276 hangc0276 added area/broker type/bug The PR fixed a bug or issue reported a bug labels Oct 9, 2021
@codelipenghui codelipenghui merged commit 9137e6b into apache:master Oct 25, 2021
@shoothzj shoothzj deleted the concuurent-delete-sub-topic branch October 25, 2021 00:42
zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Oct 25, 2021
* up/master: (46 commits)
  [website][upgrade]feat: docs migration - version-2.7.2 Pulsar Schema (apache#12393)
  [docs] io-develop, fix broken link (apache#12414)
  docs(function): fix incorrect classname in python runtime sample (apache#12476)
  Remove redundant null check for getInternalListener (apache#12474)
  Fix the retry topic's `REAL_TOPIC` & `ORIGIN_MESSAGE_ID` property should not be modified once it has been written. (apache#12451)
  [cli] Fix output format of string by pulsar-admin command (apache#11878)
  fix the race of delete subscription and delete topic (apache#12240)
  fix influxdb yaml doc (apache#12460)
  [Modernizer] Add Maven Modernizer plugin in pulsar-proxy module (apache#12326)
  fix DefaultCryptoKeyReaderTest can not run on windows (apache#12475)
  apache#12429 only fixed the compactor skips data issue, but the normal reader/consumer (apache#12464)
  broker resource group test optimize fail msg (apache#12438)
  Stop OffsetStore when stopping the connector (apache#12457)
  fix a typo in UnAckedMessageTracker (apache#12467)
  docs(function): fix typo in pip install (apache#12468)
  Optimize the code: remove extra spaces (apache#12470)
  optimize SecurityUtility code flow (apache#12431)
  Update lombok to 1.18.22 (apache#12466)
  Update team.js to add David K. as a committer (apache#12440)
  Fix java demo error in reset cursor admin (apache#12454)
  ...

# Conflicts:
#	site2/website-next/versioned_docs/version-2.7.2/schema-evolution-compatibility.md
#	site2/website-next/versioned_docs/version-2.7.2/schema-get-started.md
#	site2/website-next/versioned_docs/version-2.7.2/schema-manage.md
#	site2/website-next/versioned_docs/version-2.7.2/schema-understand.md
#	site2/website-next/versioned_sidebars/version-2.7.2-sidebars.json
codelipenghui pushed a commit that referenced this pull request Oct 26, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 26, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
codelipenghui pushed a commit that referenced this pull request Dec 20, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.2 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent delete subscription and delete topic lead to memory leak
6 participants