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][broker] Allow Access to System Topic Metadata for Reader Creation Post-Namespace Deletion #20304

Merged
merged 5 commits into from
May 12, 2023
Merged

[fix][broker] Allow Access to System Topic Metadata for Reader Creation Post-Namespace Deletion #20304

merged 5 commits into from
May 12, 2023

Conversation

liangyepianzhou
Copy link
Contributor

@liangyepianzhou liangyepianzhou commented May 11, 2023

Motivation

After initiating the snapshot segment function, deletion of topics necessitates the activation of readers. Furthermore, these readers should be opened and deleted as they are used, which implies that we should not pre-store readers. However, after initiating the deletion of namespaces currently, it is not allowed to obtain the metadata of partition topics or lookup, making it impossible to create readers. This results in the inability to delete namespaces.

Modification

Allow the acquisition of system topic metadata after initiating namespace deletion, thus creating readers to clean up topic data.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

…on Post-Namespace Deletion

## Motivation
After initiating the snapshot segment function, deletion of topics necessitates the activation of readers. Furthermore, these readers should be opened and deleted as they are used, which implies that we should not pre-store readers. However, after initiating the deletion of namespaces currently, it is not allowed to obtain the metadata of partition topics, making it impossible to create readers. This results in the inability to delete namespaces.

## Modification
Allow the acquisition of system topic metadata after initiating namespace deletion, thus creating readers to clean up topic data.
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 11, 2023
@liangyepianzhou liangyepianzhou self-assigned this May 11, 2023
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

I have left one comment, please take a look

@liangyepianzhou liangyepianzhou merged commit 5d5ec94 into apache:master May 12, 2023
@liangyepianzhou liangyepianzhou deleted the allow_GetSystemMetadateWhenDeleteSystemTopic branch May 12, 2023 11:29
@poorbarcode poorbarcode added this to the 3.1.0 milestone May 30, 2023
poorbarcode pushed a commit that referenced this pull request May 30, 2023
…on Post-Namespace Deletion (#20304)

## Motivation
After initiating the snapshot segment function, deletion of topics necessitates the activation of readers. Furthermore, these readers should be opened and deleted as they are used, which implies that we should not pre-store readers. However, after initiating the deletion of namespaces currently, it is not allowed to obtain the metadata of partition topics or lookup, making it impossible to create readers. This results in the inability to delete namespaces.

## Modification
Allow the acquisition of system topic metadata after initiating namespace deletion, thus creating readers to clean up topic data.

(cherry picked from commit 5d5ec94)
mattisonchao pushed a commit that referenced this pull request Nov 19, 2023
…on Post-Namespace Deletion (#20304)

After initiating the snapshot segment function, deletion of topics necessitates the activation of readers. Furthermore, these readers should be opened and deleted as they are used, which implies that we should not pre-store readers. However, after initiating the deletion of namespaces currently, it is not allowed to obtain the metadata of partition topics or lookup, making it impossible to create readers. This results in the inability to delete namespaces.

Allow the acquisition of system topic metadata after initiating namespace deletion, thus creating readers to clean up topic data.

(cherry picked from commit 5d5ec94)
@mattisonchao
Copy link
Member

Since it changed the namespace deletion, I cherry-picked this PR to branch-2.11 without the transaction test.

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.

7 participants