Skip to content

[improve][broker] Add createTopicIfDoesNotExist option to RawReader constructor - #22264

Merged
nodece merged 1 commit into
apache:masterfrom
coderzc:improve_RawReader_autocreatetopic
Mar 14, 2024
Merged

[improve][broker] Add createTopicIfDoesNotExist option to RawReader constructor#22264
nodece merged 1 commit into
apache:masterfrom
coderzc:improve_RawReader_autocreatetopic

Conversation

@coderzc

@coderzc coderzc commented Mar 14, 2024

Copy link
Copy Markdown
Member

Motivation

In #21745, we disabled the createTopicIfDoesNotExists of RawReader to avoid the compactor‘s RawReader will create the topic again after the topic has been deleted.
Because the RawReader is a public API, so we'd better not change the default behavior. we can add an option for RawReader.

Modifications

Add createTopicIfDoesNotExist option to RawReader constructor.

Revert RawReader to default behavior (auto create topic)

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:

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Mar 14, 2024
@coderzc
coderzc requested review from codelipenghui and zymap March 14, 2024 06:20
@coderzc coderzc self-assigned this Mar 14, 2024
@dao-jun dao-jun added this to the 3.3.0 milestone Mar 14, 2024
@dao-jun dao-jun closed this Mar 14, 2024
@dao-jun dao-jun reopened this Mar 14, 2024
@codecov-commenter

codecov-commenter commented Mar 14, 2024

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22264      +/-   ##
============================================
+ Coverage     73.57%   73.61%   +0.03%     
- Complexity    32624    32740     +116     
============================================
  Files          1877     1879       +2     
  Lines        139502   139795     +293     
  Branches      15299    15340      +41     
============================================
+ Hits         102638   102906     +268     
+ Misses        28908    28903       -5     
- Partials       7956     7986      +30     
Flag Coverage Δ
inttests 26.88% <80.00%> (+2.30%) ⬆️
systests 24.33% <80.00%> (+0.01%) ⬆️
unittests 72.86% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/client/api/RawReader.java 100.00% <100.00%> (ø)
...a/org/apache/pulsar/client/impl/RawReaderImpl.java 84.76% <100.00%> (ø)
...n/java/org/apache/pulsar/compaction/Compactor.java 80.76% <100.00%> (ø)

... and 86 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.

@nodece
nodece merged commit 1156904 into apache:master Mar 14, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 19, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 19, 2024
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
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