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

[v23.3.x] Return accurate partition count and replication factor in CreateTopics response #16452

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #16410
Fixes: #16450, Fixes: #16451,

Specifically we noticed that cleanup.policy was populated with a stringified
int in CreateTopics results. We implement formatters for several topic config
types, so we should use them.

Using e.g. "delete" for the cleanup policy value (rather than "1") matches
the behavior of Apache Kafka.

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 59b43d3)
To amend create_topics responses with the partition count and replication
factor of the created (or already existing) topic.

Values pulled from metadata cache (similar to append_topic_configs)

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit bf6763d)
- If the topic already exists, use that return code (36)
- If the topic does not exist, return the partition count and replication
  factor from the request.
- Responses now match Apache Kafka

(cherry picked from commit b48d3ac)
Adapter for raw_create_topics that takes a list of client-supplied
dicts, packs them up in raw requests, and issues a create request.
Loads the result into a dict, extracts 'Topics' field, and returns
the result (or empty list if something went wrong).

Also adds a validate_only bool param to raw_create_topics

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 4d7a466)
Test for correct config serialization and treatment of specific and defaulted
partition count and replication factor values in responses.

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit dad47cb)
In `CreateTopicsResponseTest`.

(cherry picked from commit 0654662)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Feb 2, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Feb 2, 2024
@oleiman oleiman self-assigned this Feb 2, 2024
Copy link
Member

@oleiman oleiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean backport 👍

@oleiman oleiman merged commit 540b29f into redpanda-data:v23.3.x Feb 2, 2024
19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.5 Feb 7, 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