This repository was archived by the owner on Jan 24, 2024. It is now read-only.
[FEATURE] Reusing the Pulsar message deduplication - #1006
Merged
BewareMyPower merged 11 commits intoJan 30, 2022
Merged
Conversation
Demogorgon314
force-pushed
the
impl/reuse-pulsar-message-deduplication
branch
from
January 18, 2022 02:13
0f2ed27 to
0f847cf
Compare
Demogorgon314
marked this pull request as ready for review
January 19, 2022 02:16
Contributor
|
Add the |
BewareMyPower
left a comment
Contributor
There was a problem hiding this comment.
Overall LGTM. I've left some comments, PTAL. I'll review again after comments are addressed.
Demogorgon314
force-pushed
the
impl/reuse-pulsar-message-deduplication
branch
from
January 29, 2022 06:18
940b142 to
1310cd7
Compare
BewareMyPower
approved these changes
Jan 30, 2022
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 9, 2022
Fixes #957 #1007 ## Motivation Currently, the KoP use Kafka's implantation to check duplicate message, but it is hard to support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`. However, we should reuse the Pulsar message duplication check in KoP by mapping `baseSequence` to `sequenceId` and `lastSequence` to `highestSequenceId`. Pulsar is using producer name to persist sequenced, in KoP we want to follow the Kafka behavior. So we need to use a name role to build a producer name. Because Kafka will reuse PID when the transaction ID is the same but will increase the producer Enoch. So we need to ensure the producer name is not the same. So the producer name role is `PID_PREFIX-{producerId}-{producerEpoch}`. ## Modifications Support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`, and reuse Pulsar message deuplication. (cherry picked from commit 1841b82)
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 9, 2022
Fixes #957 #1007 ## Motivation Currently, the KoP use Kafka's implantation to check duplicate message, but it is hard to support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`. However, we should reuse the Pulsar message duplication check in KoP by mapping `baseSequence` to `sequenceId` and `lastSequence` to `highestSequenceId`. Pulsar is using producer name to persist sequenced, in KoP we want to follow the Kafka behavior. So we need to use a name role to build a producer name. Because Kafka will reuse PID when the transaction ID is the same but will increase the producer Enoch. So we need to ensure the producer name is not the same. So the producer name role is `PID_PREFIX-{producerId}-{producerEpoch}`. ## Modifications Support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`, and reuse Pulsar message deuplication.
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 9, 2022
Fixes #957 #1007 ## Motivation Currently, the KoP use Kafka's implantation to check duplicate message, but it is hard to support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`. However, we should reuse the Pulsar message duplication check in KoP by mapping `baseSequence` to `sequenceId` and `lastSequence` to `highestSequenceId`. Pulsar is using producer name to persist sequenced, in KoP we want to follow the Kafka behavior. So we need to use a name role to build a producer name. Because Kafka will reuse PID when the transaction ID is the same but will increase the producer Enoch. So we need to ensure the producer name is not the same. So the producer name role is `PID_PREFIX-{producerId}-{producerEpoch}`. ## Modifications Support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`, and reuse Pulsar message deuplication. (cherry picked from commit 1841b82)
eolivelli
pushed a commit
to eolivelli/kop
that referenced
this pull request
Feb 24, 2022
Fixes streamnative#957 streamnative#1007 Currently, the KoP use Kafka's implantation to check duplicate message, but it is hard to support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`. However, we should reuse the Pulsar message duplication check in KoP by mapping `baseSequence` to `sequenceId` and `lastSequence` to `highestSequenceId`. Pulsar is using producer name to persist sequenced, in KoP we want to follow the Kafka behavior. So we need to use a name role to build a producer name. Because Kafka will reuse PID when the transaction ID is the same but will increase the producer Enoch. So we need to ensure the producer name is not the same. So the producer name role is `PID_PREFIX-{producerId}-{producerEpoch}`. Support `MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1`, and reuse Pulsar message deuplication. (cherry picked from commit 1841b82)
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #957 #1007
Motivation
Currently, the KoP use Kafka's implantation to check duplicate message, but it is hard to support
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1.However, we should reuse the Pulsar message duplication check in KoP by mapping
baseSequencetosequenceIdandlastSequencetohighestSequenceId.Pulsar is using producer name to persist sequenced, in KoP we want to follow the Kafka behavior. So we need to use a name role to build a producer name.
Because Kafka will reuse PID when the transaction ID is the same but will increase the producer Enoch. So we need to ensure the producer name is not the same.
So the producer name role is
PID_PREFIX-{producerId}-{producerEpoch}.Modifications
Support
MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION > 1, and reuse Pulsar message deuplication.