[improve][client] Support multi-topic messageId deserialization to ack messages#19944
[improve][client] Support multi-topic messageId deserialization to ack messages#19944rdhabalia wants to merge 1 commit intoapache:masterfrom
Conversation
|
|
||
| // For the chunk message id, we need to specify the first chunk message id. | ||
| optional MessageIdData first_chunk_message_id = 7; | ||
| optional string topicName = 8; |
There was a problem hiding this comment.
I think we need a PIP to add new fields to the Pulsar API. In PIP-224 I proposed to add an extra class TopicMessageIdSerDes for the serialization of the TopicMessageId, but the related PR is not present yet. If we can introduce such a new field, I think we don't need to implement TopicMessageIdSerDes any more.
There was a problem hiding this comment.
As I described here, the limit of PIP-224 is caused by the lack of the topic name field in MessageIdData. I think it would be better to add this field before the 3.0.0 release. But I'd like to hear more voices about this change.
There was a problem hiding this comment.
@BewareMyPower I replied on the PR serializing and deserializing is expensive and on top of that having different APIs for different use cases is creating a really bad experience for users, and I strongly feel we should avoid such APIs and complexity if things can be solved with a simple straight forward change with the same API and without creating the bad user experience.
I think we should consider this simple change without costing performance and API incompatibility and confusing usage to the users. So, I would like to avoid this change: BewareMyPower#20
There was a problem hiding this comment.
Actually I'm +1 to your PR and I think the API proposed in PIP-224 could be replaced with this PR.
few committers block all the PRs without any reason
However, the reason I blocked this PR is the current requirement of the PIP:
Any change to the wire protocol APIs
This PR brings a change to the wire protocol API, and I think it should not be passed without any proposal. /cc @merlimat @eolivelli @codelipenghui
There was a problem hiding this comment.
Hmmm, I think it's better to add a description to clarify the new field will not apply to RPC calls. It is only used by the client side to carry the topic name.
|
Could you resolve the conflicts with master? |
|
|
||
| // For the chunk message id, we need to specify the first chunk message id. | ||
| optional MessageIdData first_chunk_message_id = 7; | ||
| optional string topicName = 8; |
There was a problem hiding this comment.
hi, i come from Kafka. and i think when client enable group commit offset. the field can be group by topicName and we can have much smaller RPC message to send on the wire. see kafka OffsetCommit RPC https://kafka.apache.org/protocol.html#The_Messages_OffsetCommit : - )
|
Since we will start the RC version of
So drag this PR to |
|
@BewareMyPower anyways, I have resolved the conflict to move this PR forward. |
…alization to ack messages
Codecov Report
@@ Coverage Diff @@
## master #19944 +/- ##
=============================================
+ Coverage 24.26% 72.92% +48.66%
- Complexity 294 31857 +31563
=============================================
Files 1609 1865 +256
Lines 125669 138191 +12522
Branches 13707 15204 +1497
=============================================
+ Hits 30490 100779 +70289
+ Misses 90689 29393 -61296
- Partials 4490 8019 +3529
Flags with carried forward coverage won't be shown. Click here to find out more.
|
codelipenghui
left a comment
There was a problem hiding this comment.
It doesn't look to me to introduce wire protocol changes that without PIP.
@rdhabalia I mean it should start with a PIP because the PR introduced changes to the wire protocol. If the PR fixes a breaking change, why the PR title is using [improve], it confused me. Starting with a proposal will help us understand the whole context of the issue and why this solution is the best solution for the problem. |
|
@codelipenghui |
|
You need to send a discussion to dev@apache.org, otherwise others might not know this PIP. For example, I see the PIP number of @liangyepianzhou has conflict with this PIP. #20225 Reference: |
I recall it was mentioned before that we should select the next PIP number based on the PIP numbers in the emails. Before sending the vote email, I searched and found that PIP-266 had not been used. |
|
@liangyepianzhou @BewareMyPower |
|
The pr had no activity for 30 days, mark with Stale label. |
|
I had missed this work. |
|
The pr had no activity for 30 days, mark with Stale label. |
Motivation
Right now, when user tries to serialize messageId and deserialize messageId for a partitioned-topic and lacks the message then it fails with the below exception.
It happens because MessageId is not able deserialize into
TopicMessageIdImpland because of thatMultiTopicsConsumerImplfails to ack the message.Modifications
Support serializing and deserialzing for
messageId(TopicMessageIdImpl) ofMultiTopicsConsumer.Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: