leizhiyuan commented on PR #10937: URL: https://github.com/apache/rocketmq/pull/10937#issuecomment-6974891793
Hi @ai-yang, a heads-up for you and the reviewers: #11538 (fixing #11537) also reworks `ProduceAccumulator`, so these two PRs will conflict textually. Below is how they relate, to help decide the merge order. - **Overlapping: hold-size release and removal of completed batches.** #11538 gives each batch a single completion future. The hold size is released exactly once, and the batch removes itself from its map as soon as it is closed. This covers both the sync and async paths, including a `sendDirect` that throws synchronously. If #11538 is merged first, this part of #10937 can be dropped. - **Partly overlapping: lifecycle of the shared guard threads.** #11538 removes `GuardForSyncSendService`. Sync callers now send the batch themselves when the hold time expires, so the sync half of #10935 (sync sends hang after another producer with the same client ID shuts down) no longer applies. The async path still relies on `GuardForAsyncSendService`, so the ref-counted `start()`/`shutdown()` in #10937 is still needed for async sends. - **Not covered by #11538: producer identity in `AggregateKey`.** #11538 keeps the key as `(topic, queue, waitStoreMsgOK, tag)`, so the problem of a batch being sent through another (possibly stopped) producer remains, and #10937's change still applies. On #11538, `AggregateKey` has a single constructor, so it is a one-field change. Neither PR depends on the other for correctness. Whichever one is merged second needs a rebase. If #11538 is merged first, I'm happy to help port the lifecycle and producer-identity changes; if #10937 is merged first, I'll rebase #11538 on top of it. -- 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]
