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

[improve] Pin executor to managed ledger instance to cache the string … #3

Open
wants to merge 250 commits into
base: master
Choose a base branch
from

Conversation

merlimat
Copy link
Owner

…hashing

Fixes #xyz

Master Issue: #xyz

Motivation

Modifications

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
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@merlimat merlimat changed the title [Broker] Pin executor to managed ledger instance to cache the string … [improve] Pin executor to managed ledger instance to cache the string … Oct 17, 2022
michaeljmarshall and others added 10 commits October 20, 2022 21:11
* [fix][doc] Point Python and C++ docs to new GitHub repos

* Fix cpp examples link

* Add notice to redirect any users
…follow BookieServiceInfo updates (apache#18133)

* [fix] PulsarRegistrationClient - implement getAllBookies and follow BookieServiceInfo updates

* remove debug
### Motivation
The current MAX_ACK_GROUP_SIZE is fixed at 1000, increase the configuration acknowledgementsGroupSize, support MAX_ACK_GROUP_SIZE configurable:
https://github.com/apache/pulsar/blob/afcdbf0e2b5fb905e1f82f0220436f8f9ec0c742/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L63-L64


### Modifications
1.Add configuration acknowledgementsGroupSize;
* [feat][ci] check style for all source code

This closes apache#18131.

* fix violations

Signed-off-by: tison <[email protected]>

* no snapshot update

Signed-off-by: tison <[email protected]>

* remove mysterious dependency

Signed-off-by: tison <[email protected]>

Signed-off-by: tison <[email protected]>
… and check whether it is greater than the batch index of the previous ack (apache#18042)

Co-authored-by: leolinchen <[email protected]>
@Technoboy- Technoboy- force-pushed the managed-ledger-executor-cache branch from c27ba86 to a971e4c Compare October 22, 2022 14:16
Technoboy- and others added 17 commits October 23, 2022 12:28
…x system topic (apache#16931)

Master Issue: apache#16913
### Motivation
Implement system topic client for snapshot segment topic and index topic to send segment snapshots or indexes.
The configuration `transactionBufferSegmentedSnapshotEnabled` is used in the Transaction Buffer to determine which `AbortedTxnProcessor` is adopted by this TB.
### Modification

In the new implementation of the Transaction Buffer Snapshot System topic, because the system topic that needs to be processed has changed from the original one to three with different schemes, we have added generics to the TransactionBufferSnapshotBaseSystemTopicClient class and the SystemTopicTxnBufferSnapshotService<T> class.
And Pulsar Service maintains a factory class TransactionBufferSnapshotServiceFactory used to obtain SystemTopicTxnBufferSnapshotService.
This way, we can obtain the required System topic client through pulsarService to read and send snapshots.
<img width="1336" alt="image" src="https://user-images.githubusercontent.com/55571188/197467173-9028e58a-79cc-4fe4-81e2-c299c568caee.png">
…n delete namespaces (apache#18153)

### Motivation

In the current implementation, don't pass the `force` parameter to `deleteNamespaceBundle` when deleting namespaces, we should pass the `force` parameter.

### Modifications

Passing `force` parameter to `deleteNamespaceBundle` when delete namespaces.
…ackAffinityMapping (apache#15640)

* [Autorecovery] Default reppDnsResolverClass to ZkBookieRackAffinityMapping

* Improve documentation

Fixes: apache#18012

### Motivation

The current Bookkeeper configuration defaults to using `org.apache.bookkeeper.net.ScriptBasedMapping` for the `DNSToSwitchMapping` implementation. However, this default configuration does not align with the Broker's default configuration, which is `org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping`. As such, the default configuration for a Pulsar cluster does not lead to ideal rack awareness when ledgers need to be recovered. The result is that a user can configure a cluster for rack awareness and the brokers will honor that configuration, but the autorecovery process will not because it does not have the correct bookkeeper cluster topology view.

I propose we configure bookkeeper to use the broker's `ZkBookieRackAffinityMapping` class. That way, autorecovery will honor the operator's configured rack awareness policies out of the box.

### Modifications

* Add default value for `reppDnsResolverClass` to the `conf/bookkeeper.conf` configuration. This change effectively switches the default from `org.apache.bookkeeper.net.ScriptBasedMapping` to `org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping`.

### Verifying this change

I manually verified that the `ZkBookieRackAffinityMapping` works by running some tests in a minikube cluster deployed with the DataStax helm chart. I set up 3 racks, 4 bookies, and a topic with a E=2, Qw=2, and Qa=2. I then verified that the autorecovery pod correctly discovered the racks and then identified when an ensemble was not following the rack placement policy after two bookies were removed. I documented my testing a bit more here: datastax/pulsar-helm-chart#214.

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

It changes a default value. The tradeoff is that a user relying on the `ScriptBasedMapping` default might accidentally get switched to using the `ZkBookieRackAffinityMapping` implementation. Given that `ScriptBasedMapping` doesn't work out of the box, and that the broker's default to `ZkBookieRackAffinityMapping`, I think this is an acceptable tradeoff.

- [x] `doc`
* [fix][doc] Remove archived and halted repositories

* Add back archived repositories

For anyone who wants to revive them.

Signed-off-by: tison <[email protected]>

Signed-off-by: tison <[email protected]>
congbobo184 and others added 12 commits November 26, 2022 13:46
reason: https://lists.apache.org/thread/jcrq9q0k6kh9rvb71dwb9s3mvo5c5dk5

branch-2.9 has reset to commit `5ed247de3a5e0ff67f181b4805fd6140d8174994`, so close force-push

- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
…pache#18603)

This PR is a supplement to apache#18369.
- `AbstractTopic.isSameAddressProducersExceeded()`
- `AbstractBaseDispatcher.isConsumersExceededOnSubscription()`
### Motivation

Now we only use caffeine in broker module. *caffeine* has a jdk11+ version, which is more proper for jdk11+ project to integrated with.(Spring3.0 uses caffeine 3.X too.) So I think it's worth for us to update caffeine to 3.x

### Modifications

Update caffeine from 2.9.1 to 3.1.2

- [ ] Anything that affects deployment

### Documentation

<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->

- [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

### Matching PR in forked repository

apache#18647
@AnonHxy AnonHxy force-pushed the managed-ledger-executor-cache branch from 8a7a7ce to 9783b6b Compare November 28, 2022 16:24
@AnonHxy AnonHxy force-pushed the managed-ledger-executor-cache branch from 9783b6b to 66fc80a Compare November 29, 2022 05:05
@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.