coderzc opened a new pull request, #25031:
URL: https://github.com/apache/pulsar/pull/25031

   ### Motivation
   
   ```
   2025-10-29T12:56:32,969+0000 [pulsar-load-manager-1-1] INFO  
org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl - Writing 
local data to metadata store because maximum change 1788.8082864051726% 
exceeded threshold 10%; time since last report written is 59.999 seconds
   Caused by: javax.ws.rs.ClientErrorException: HTTP 412 {""reason"":""Invalid 
upper boundary for bundle cc/billing/0x80000000_0xc0000000. Expected upper 
boundary of xx/billing/0x80000000_0x93c58e36""}
   ...
   
org.apache.pulsar.client.admin.PulsarAdminException$PreconditionFailedException:
 Invalid upper boundary for bundle cc/billing/0x93c58e36_0xc0000000. Expected 
upper boundary of xx/billing/0x93c58e36_0xab7838eb
        at 
org.apache.pulsar.client.admin.PulsarAdminException.wrap(PulsarAdminException.java:252)
 ~[io.streamnative-pulsar-client-admin-api-4.0.4.1.jar:4.0.4.1]
        at 
org.apache.pulsar.client.admin.internal.BaseResource.sync(BaseResource.java:352)
 ~[io.streamnative-pulsar-client-admin-original-4.0.4.1.jar:4.0.4.1]
        at 
org.apache.pulsar.client.admin.internal.NamespacesImpl.splitNamespaceBundle(NamespacesImpl.java:877)
 ~[io.streamnative-pulsar-client-admin-original-4.0.4.1.jar:4.0.4.1]
        at 
org.apache.pulsar.client.admin.internal.NamespacesImpl.splitNamespaceBundle(NamespacesImpl.java:864)
 ~[io.streamnative-pulsar-client-admin-original-4.0.4.1.jar:4.0.4.1]
        at 
org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.checkNamespaceBundleSplit(ModularLoadManagerImpl.java:776)
 ~[io.streamnative-pulsar-broker-4.0.4.1.jar:4.0.4.1]
        at 
org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.updateAll(ModularLoadManagerImpl.java:476)
 ~[io.streamnative-pulsar-broker-4.0.4.1.jar:4.0.4.1]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source) ~[?:?]
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 ~[io.netty-netty-common-4.1.119.Final.jar:4.1.119.Final]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]
   ```
   
   As you can see from the log, after `0x80000000_0xc0000000` was successfully 
split, it was split again for the second time calling the updateAll() method. 
Since `writeLoadReportOnZookeeper` is only called at regular intervals, so 
`findBundlesToSplit` return old bundle data. I think we manual call 
writeLoadReportOnZookeeper after split bundles to avoid this error.
   
   
   ### Modifications
   
   Manual call `writeLoadReportOnZookeeper` after split bundles
   
   ### Verifying this change
   
   - [x] 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:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *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
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions 
will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since 
the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed 
in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments 
have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to