-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Improve][Producer] simplify the flush logic (#1049)
### Motivation Simplify the producer flush logic ### Modifications 1. add a callback field to the pendingItem, default is nil; 2. in partitionProducer.internalFlush() get the last pendingItem from pendingQueue; 3. update the last pendingItem by setup a new callback; 4. in partitionProducer.ReceivedSendReceipt, no need to identify the sendRequest by checking if the msg is nil; 5. in pendingItem.Complete(), invoke its callback to notify the flush is done. --------- Co-authored-by: gunli <gunli@tencent.com>
- Loading branch information
Showing
1 changed file
with
24 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters