You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/25 03:07:49 UTC

[GitHub] [pulsar] aloyszhang commented on issue #17268: PIP-202: Enable read-only partition, add read and write control for a single partition.

aloyszhang commented on issue #17268:
URL: https://github.com/apache/pulsar/issues/17268#issuecomment-1226716966

   The pip number is duplicated. See
   https://github.com/apache/pulsar/issues/17090
   
   baomingyu ***@***.***> 于2022年8月25日周四 10:56写道:
   
   > Motivation
   >
   > In the exclusive consumption mode of exclusive, failover, reader, etc. if
   > a large number of messages accumulate due to limited consumption capacity
   > or consumption logic problems, expanding partitions or modifying
   > consumption logic cannot reduce the consumption of new messages in time.
   > Influence, a certain proportion of newly added messages will still be
   > produced in the accumulated paritition, and new messages cannot be quickly
   > consumed by restarted consumers or new consumers. In this way, the time
   > affected by the accumulation factor may very long.
   > In order to reduce the impact on the business, through the control of read
   > and write permissions, configure some partitions as read-only, so that
   > newly produced messages can be sent to the partitions with less
   > accumulation or newly expanded, reducing the impact on the business caused
   > by the accumulation of messages. Reduce the overall time-consuming of
   > production--consumption.
   > Goal
   >
   > Add read and write control for a single partition
   > API Changes
   >
   > 1、PB protocl
   > message CommandPartitionedTopicMetadataResponse {
   > enum LookupType {
   > Success = 0;
   > Failed = 1;
   > }
   > optional uint32 partitions = 1; // Optional in case of error
   > required uint64 request_id = 2;
   > optional LookupType response = 3;
   > optional ServerError error = 4;
   > optional string message = 5;
   > repeated KeyValue metadata = 6;// key parition index,value:r、w、rw
   > }
   >
   > 2、Modify choosePartition method in all implement class of MessageRouter,
   > and it will not choose read-only partition to send msg.
   >
   > 3、ProducerImpl adds permission attributes, and if permission is read-only
   > will not be used sending msg.
   >
   > 4、Modify admin interface updatePartitionedTopic to update metadata of topic
   > Implementation
   >
   > 1、PB protocl
   > message CommandPartitionedTopicMetadataResponse {
   > enum LookupType {
   > Success = 0;
   > Failed = 1;
   > }
   > optional uint32 partitions = 1; // Optional in case of error
   > required uint64 request_id = 2;
   > optional LookupType response = 3;
   > optional ServerError error = 4;
   > optional string message = 5;
   > repeated KeyValue metadata = 6;// key parition index,value:r、w、rw
   > }
   >
   > 2、Modify choosePartition method in all implement class of MessageRouter,
   > and it will not choose read-only partition to send msg.
   >
   > 3、ProducerImpl adds permission attributes, and if permission is read-only
   > will not be used sending msg.
   >
   > 4、Modify admin interface updatePartitionedTopic to update metadata of topic
   > Alternatives
   >
   > *No response*
   > Anything else?
   >
   > *No response*
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/pulsar/issues/17268>, or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ALOWDKPUEIEW2N5HG2LMPK3V23OGNANCNFSM57ROEA7Q>
   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org