[improve][pip] Change cursor`s properties to store chunk ID map.#21027
Closed
liangyepianzhou wants to merge 1 commit intoapache:masterfrom
liangyepianzhou:pip-295
Closed
[improve][pip] Change cursor`s properties to store chunk ID map.#21027liangyepianzhou wants to merge 1 commit intoapache:masterfrom liangyepianzhou:pip-295
liangyepianzhou wants to merge 1 commit intoapache:masterfrom
liangyepianzhou:pip-295
Conversation
|
@liangyepianzhou Please add the following content to your PR description and select a checkbox: |
poorbarcode
reviewed
Aug 24, 2023
| ```java | ||
| // Recover properties map | ||
| Map<String, String> recoveredProperties; | ||
| if (info.getPropertiesCount() == 0 && info.getmarkDeletePropertiesCount() == 0) { |
Contributor
There was a problem hiding this comment.
The info means ManagedCursorInfo, right?
| # Goals | ||
|
|
||
| ## In Scope | ||
| Chunk messages can be effectively filtered on the broker side. Ensure that chunk messages work normally after enabling deduplication and the topic has no duplicate chunks. |
Contributor
There was a problem hiding this comment.
Background:*: There are two properties in the metadata of the cursor
properties<String, Long>: used to maintain the last sequence of producer-sent messages[1].cursorProperties<String, String>: used to maintain the subscription properties.- PIP: PIP 105: Support pluggable entry filter in Dispatcher #12269
- PR: PIP-105 Per-subscription properties are not persistent to MetadataStore #15750
[1]: a structure of properties:
properties:
- "producer_name_1" : {{last_persist_sequence_1}}
- "producer_name_2" : {{last_persist_sequence_2}}In this PIP, you want to change properties<String, Long> to properties<String, String>, right? Could you also explain this change here?
| .build(); | ||
| ``` | ||
|
|
||
| Optimize the `properties` of the `MarkDeleteEntry` from `Map<String, Long>` to `Map<String, String>`. In the depublication design, the ' MarkDeleteEntry' properties are used as a snapshot to store the sequence ID map. After introducing the chunk ID map, it cannot hold two long for each producer. So we hope to change the `MarkDeleteEntry' properties from `Map<String, Long>` to `Map<String, String>` to make it more flexible. |
Contributor
There was a problem hiding this comment.
Could you add a demo to describe the structure of the attribute properties of cursor metadata that you wanted after this PIP?
4 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Chunk messages can be effectively filtered on the broker side. Ensure that chunk messages work normally after enabling deduplication and the topic has no duplicate chunks.
Modifications
chunkIDPushedandchunkIDPersistedto store the chunk of each producer`s ongoing chunk messages. It will be used to check whether the chunks in a single message are duplicated.propertiesof theMarkDeleteEntryfromMap<String, Long>toMap<String, String>.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: