This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.wiki.git


The following commit(s) were added to refs/heads/master by this push:
     new 78b285c  Updated PIP 54: Support acknowledgment at batch index level 
(markdown)
78b285c is described below

commit 78b285c383f302d0af04067121a117c668f57140
Author: lipenghui <[email protected]>
AuthorDate: Sat Feb 22 11:44:07 2020 +0800

    Updated PIP 54: Support acknowledgment at batch index level (markdown)
---
 PIP-54:-Support-acknowledgment-at-batch-index-level.md | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/PIP-54:-Support-acknowledgment-at-batch-index-level.md 
b/PIP-54:-Support-acknowledgment-at-batch-index-level.md
index e3769d5..913014e 100644
--- a/PIP-54:-Support-acknowledgment-at-batch-index-level.md
+++ b/PIP-54:-Support-acknowledgment-at-batch-index-level.md
@@ -7,7 +7,7 @@
 
 ## Motivation
 
-Currently, the managed cursor maintain the acked messages by mark delete 
position and individual delete messages. All of the mark delete position and 
individual delete messages are faced to batch messages(ledgerId,entryId). For 
users, the single message is the publishing and consuming unit. Since the 
managed cursor can’t maintain the local index of a batch message, broker will 
dispatch acked messages(not batch) to consumers like issue 
https://github.com/apache/pulsar/issues/5969.
+Currently, the managed cursor maintains the acked messages by mark delete 
position and individual delete messages. All of the mark delete position and 
individual delete messages are faced to batch messages(ledgerId,entryId). For 
users, the single message is the publishing and consuming unit. Since the 
managed cursor can’t maintain the local index of a batch message, broker will 
dispatch acked messages(not batch) to consumers such as 
https://github.com/apache/pulsar/issues/5969.
 
 So this PIP is to support the ability to track the ack status of each batch 
index to avoid dispatch acked messages to users.
 
@@ -15,14 +15,11 @@ So this PIP is to support the ability to track the ack 
status of each batch inde
 
 This approach requires the cooperation of the client and server. When the 
broker dispatch messages, it will carry the batch index that has been acked. 
The client will filter out the batch index that has been acked.
 
-Client need to send the batch index ack information to broker, so that broker 
can maintain the batch index ack status. 
+The client needs to send the batch index ack information to the broker so that 
the broker can maintain the batch index ack status. 
 
-The managed cursor maintain the batch index ack status in memory by using a 
BitSet and the BitSet can be persisted to ledger and metastore, so that can 
avoid broker crash. When broker receive the batch index ack request, the acked 
batch index will be add the BitSet. When broker dispatch messages to client 
will get the batch message index ack status from the managed cursor and send it 
to client. When all indexes of the batch message are acked, the cursor will 
delete the batch message.
-
-Be careful when calculating consumer permits because client filter out the 
acked batch index, so the broker need to increase the available permits equals 
to acked batch indexes. Otherwise, the broker will stop dispatch messages to 
that consumer because it does not have enough available permits.
-
-For save resources, transfer the acked batch indexes ranges between client and 
broker. And in managed cursor also persist batch indexes ranges to the cursor 
ledger and metadata store.
+The managed cursor maintains the batch index ack status in memory by using a 
BitSet and the BitSet can be persisted to a ledger and the metastore, so that 
can avoid broker crash. When the broker receives the batch index ack request, 
the acked batch index will be adding to the BitSet. When broker dispatch 
messages to the client will get the batch message index ack status from the 
managed cursor and send it to the client. When all indexes of the batch message 
are acked, the cursor will del [...]
 
+Be careful when calculating consumer permits because the client filter out the 
acked batch index, so the broker need to increase the available permits equals 
to acked batch indexes. Otherwise, the broker will stop dispatch messages to 
that consumer because it does not have enough available permits.
 
 ## Changes
 

Reply via email to