GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — [fix][metadata]Solve the problem of broker log looping and request failure stagnation after network packet loss recovery by Radiancebobo · Pull Request #26254 · apache/pulsar Conversation
Contributor
MotivationDuring ZooKeeper session-expired recovery, the broker can close the old ZooKeeper handle and create a new Before this change, This matters because In a severe network-loss scenario, this can become a recovery storm:
The logs will output in a loop as follows: The fix is to make the state machine explicit: only Modifications
Verifying this change
This change added tests and can be verified as follows:
Commands run locally: ./gradlew :pulsar-metadata:test --tests org.apache.pulsar.metadata.impl.ZKSessionWatcherTest --tests org.apache.pulsar.metadata.ZKSessionTest ./gradlew :pulsar-metadata:checkstyleMain :pulsar-metadata:checkstyleTest Does this pull request potentially affect one of the following parts:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …ient (apache#26480) ### Motivation `pulsar-perf` was migrated to the V5 client API in apache#25887 and `pulsar-client` in apache#25917, so every subcommand of both tools now drives the V5 SDK. Pulsar 5.0 does not deprecate ordinary (non-scalable) topics and the v4 client remains fully supported, so it is still useful to drive the CLI tools with the v4 client: for benchmark results comparable across broker versions (the v4 commands can also target pre-5.0 brokers, which the V5 SDK cannot talk to at all), and for testing the v4 client and ordinary topics without the V5 SDK in the path. The migration also left a set of options that are still accepted but no longer do what they say, with no way to get the behaviour back — round-robin partition routing and the outstanding-message limits on `produce`, the real subscription types and the receiver-queue knobs on `consume`, the v4 `Reader` and its `<ledgerId>:<entryId>` start position on `read`, the v4 transaction coordinator on `transaction`, KeyValue schemas and non-durable subscriptions on `pulsar-client`, and `loadConf` for `client.conf` keys without a dedicated CLI flag. ### Modifications Each command is split into an abstract base holding everything that is not client-specific, plus two thin sibling subclasses that bind the client types — the existing V5 command and a new v4 one: ``` PerformanceProducerBase -> PerformanceProducer / PerformanceProducerV4 (produce-v4) PerformanceConsumerBase -> PerformanceConsumer / PerformanceConsumerV4 (consume-v4) PerformanceReaderBase -> PerformanceReader / PerformanceReaderV4 (read-v4) PerformanceTransactionBase -> PerformanceTransaction / PerformanceTransactionV4 (transaction-v4) AbstractCmdProduce -> CmdProduce / CmdProduceV4 (produce-v4) AbstractCmdConsumeCommand -> CmdConsume / CmdConsumeV4 (consume-v4) AbstractCmdReadCommand -> CmdRead / CmdReadV4 (read-v4) ``` `PulsarClientTool` builds a second, lazily-supplied v4 `ClientBuilder` for the `*-v4` commands; it keeps `loadConf` and accepts `http://` service URLs. `pulsar-shell` picks the new `pulsar-client` commands up for free, and both tools' `gen-doc` / `generate_documentation` render them. New subcommands only. The V5 commands keep their behaviour apart from a few deliberate fixes that the split surfaced (the `ProducerSocket` send/ack ordering and its `close()` null guard, the transaction receive-failure path), plus some added "use the `-v4` command" pointers on existing warnings — all listed in the PR description. ### Verifying this change Covered by `PulsarPerfTestToolTest`, `PerformanceV4CommandsTest`, `PerformanceTransactionV4Test`, `CmdV4CommandsTest`, `PulsarClientToolTest` (including the three KeyValue cases disabled by apache#25917, now re-enabled against `produce-v4`), and new `produce-v4` / `consume-v4` / `read-v4` cases in the `PerfToolTest` integration test. …ad of under the wrapper write lock (apache#26463) …ck allocation hotspot (apache#26500) …xMetadataInterceptor isn't configured (apache#26497) …Url.isEmpty() (apache#26473) Co-authored-by: maxlisongsong <[email protected]> …nd in a terminal state (apache#26476) Co-authored-by: maxlisongsong <[email protected]> … the JVM max direct memory (apache#26491) …level message id (apache#26477) Co-authored-by: maxlisongsong <[email protected]> …loss during frequent reconnects on Shared subscriptions (apache#26289) …names containing a dot work (apache#26451) …he#26516) Co-authored-by: Lari Hotari <[email protected]> …ing, default bookie cache sizes and bottleneck analysis guidance to the performance tests (apache#26749) …ger trim, delete and offload path (apache#26746) …, pulsar-perf and the CLI tools (apache#26783) …in offloaded ledgers (apache#26778) Co-authored-by: Claude Opus 5.5 <[email protected]> …WhileDisconnectedAdvancesTheCursor (apache#26789) …s per profiled component, and profile on Alpine (apache#26787) … same data block (apache#26782) Co-authored-by: Claude Opus 5.5 <[email protected]> …ActiveCursorLeavesMillis to managed ledgers (apache#26785) …ar Functions and IO (apache#26697) …tSplitKeepTheAccountingBalanced (apache#26792) Co-authored-by: Rahul Prasad <[email protected]>
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |