Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.1.x] Made client id parsing vcluster aware #18520

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #18464

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 5aae639)
When using mpx protocol extension actual client id is only a part of the
whole client id buffer sent by MPX to Redpanda. Added a method allowing
overriding client id.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 934c09c)
Previously Redpanda virtualized Kafka connections based on the full
client_id string and the string was used as a client id in all
downstream processing.

Change the parsing logic to add context to the parsed client id.
The client id format expected by Redpanda has the following structure:

```
[vcluster_id][connection_id][actual client id]
```
where:

`vcluster_id` - string encoded XID representing virtual cluster
	        (20 characters)

`connection_id` - hex encoded 32 bit integer representing virtual
                  connection id (8 characters)

`client_id` - standard protocol defined client id

If Redpanda fails to parse the client id while working with virtualized
connections the whole connection is closed.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit b4cf843)
Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 5a11716)
Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 953135b)
Replaced `node_hash_map` keeping state of virtualized connections with
`chunked_hash_map`. The change will allow us to avoid large allocations
when dealing with large virtual connection number.

Signed-off-by: Michał Maślanka <michal@redpanda.com>
(cherry picked from commit 187dcbf)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone May 16, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label May 16, 2024
@mmaslankaprv mmaslankaprv merged commit 06368d4 into redpanda-data:v24.1.x May 20, 2024
19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.3 May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants