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] Update topic policies as much as possible when some ex was thrown #21810

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Dec 27, 2023

Motivation

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:

  • 7 rate limiters(publish, dispatch topic-level, dispatch subscription-level, dispatch resourceGroup-level, subscribe API, replication, shadow topic replication)
  • update ManagedLedger configs(retention, offloader)
  • start/stop replication
  • start/stop compaction
  • start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the update subscribe rate limiter failure (you did not edit the subscribe rate limitation policy)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

Modifications

  • Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
  • Rename updatePublishDispatcher to updatePublishRateLimiter

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 27, 2023
@poorbarcode poorbarcode self-assigned this Dec 27, 2023
@poorbarcode poorbarcode added release/2.10.6 category/reliability The function does not work properly in certain specific environments or failures. e.g. data lost release/3.0.3 release/2.11.4 and removed doc-not-needed Your PR changes do not impact docs labels Dec 27, 2023
@poorbarcode poorbarcode added this to the 3.3.0 milestone Dec 27, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 27, 2023
@poorbarcode poorbarcode reopened this Dec 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (2d57624) 73.64% compared to head (3ce9a86) 73.60%.
Report is 12 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21810      +/-   ##
============================================
- Coverage     73.64%   73.60%   -0.05%     
- Complexity    32300    32313      +13     
============================================
  Files          1858     1858              
  Lines        138040   138141     +101     
  Branches      15116    15141      +25     
============================================
+ Hits         101660   101675      +15     
- Misses        28549    28602      +53     
- Partials       7831     7864      +33     
Flag Coverage Δ
inttests 24.14% <64.51%> (-0.12%) ⬇️
systests 23.75% <58.06%> (-0.05%) ⬇️
unittests 72.88% <90.32%> (-0.05%) ⬇️

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

Files Coverage Δ
...rg/apache/pulsar/broker/service/AbstractTopic.java 87.77% <ø> (-0.12%) ⬇️
...rg/apache/pulsar/broker/service/BrokerService.java 80.99% <100.00%> (-0.31%) ⬇️
...oker/service/nonpersistent/NonPersistentTopic.java 70.58% <100.00%> (-0.68%) ⬇️
...java/org/apache/pulsar/common/util/FutureUtil.java 74.54% <100.00%> (+0.47%) ⬆️
...sar/broker/service/persistent/PersistentTopic.java 78.41% <88.88%> (-0.31%) ⬇️

... and 72 files with indirect coverage changes

@poorbarcode poorbarcode merged commit ed59967 into apache:master Jan 3, 2024
48 of 49 checks passed
poorbarcode added a commit that referenced this pull request Jan 4, 2024
… was thrown (#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
poorbarcode added a commit that referenced this pull request Jan 4, 2024
… was thrown (#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
poorbarcode added a commit that referenced this pull request Jan 4, 2024
… was thrown (#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
poorbarcode added a commit that referenced this pull request Jan 4, 2024
… was thrown (#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
nodece pushed a commit to nodece/pulsar that referenced this pull request Feb 23, 2024
… was thrown (apache#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 1, 2024
… was thrown (apache#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
(cherry picked from commit 19c9e7f)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
… was thrown (apache#21810)

After the topic policies update, there are many components will be updated one by one, even if the config of components has not been modified. There are the 11 components that need update:
- `7` rate limiters(`publish`, `dispatch topic-level`, `dispatch subscription-level`,  `dispatch resourceGroup-level`, `subscribe API`, `replication`, `shadow topic replication`)
- update ManagedLedger configs(`retention`, `offloader`)
- start/stop replication
- start/stop compaction
- start/stop deduplication

Once a component update fails, the following update will be skipped. It would cause a confusing thing: you want to set a retention policy, but it will be skipped due to the `update subscribe rate limiter` failure (you did not edit the `subscribe rate limitation policy`)

Since none of the components in the above list have any additional dependencies for individual updates, ensuring success as much as possible is appropriate.

- Update topic policies as much as possible even if some component updates fail, all component updates are still in the same thread, and they still update one by one, just throw the error later.
- Rename `updatePublishDispatcher` to `updatePublishRateLimiter`

(cherry picked from commit ed59967)
(cherry picked from commit 19c9e7f)
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.

None yet

4 participants