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

Wrong field values reported in CreateTopicsResponse (v5+) #15722

Closed
weeco opened this issue Dec 18, 2023 · 3 comments · Fixed by #16410
Closed

Wrong field values reported in CreateTopicsResponse (v5+) #15722

weeco opened this issue Dec 18, 2023 · 3 comments · Fixed by #16410
Assignees
Labels
area/kafka kind/bug Something isn't working

Comments

@weeco
Copy link

weeco commented Dec 18, 2023

Version & Environment

Redpanda version: (use rpk version): v23.2.19

What went wrong?

I used franz-go to send a CreateTopicsRequest with the following payload:

ss-YL18gkcv

and I get the following response back:

ss-RbICLcAJ

The unexpected behaviour is:

  1. NumPartitions is set to -1
  2. ReplicationFactor is set to -1
  3. It reports that cleanup.policy is set at the TopicSource, but it wasn't part of the request. The reported value of 1 is also odd.

What should have happened instead?

  1. NumPartitions should report how many partitions were created for this topic. This is especially useful when requesting the default number of partitions.
  2. ReplicationFactor should report how many replicas every partition has for this topic. This is especially useful when requesting the default number of partitions.
  3. Configs should only report topic-level configs with their actual value. Since cleanup.policy was not set as part of the request it should not be part of the response. Also the value of 1 is an invalid entry, it should only allow delete, compact or compact,delete for this field.

How to reproduce the issue?

  1. Send a CreateTopic request with v5+ (probably can use rpk)
  2. Look at CreateTopic response

Additional information

Please attach any relevant logs, backtraces, or metric charts.

@oleiman
Copy link
Member

oleiman commented Jan 31, 2024

Quick note before I forget - for the cleanup.policy config, 5 is the correct source here, mapping to "default config" in both Redpanda and Apache Kafka.

Other aspects of this issue are repro'ed, validated, and fixes are WIP.

@twmb
Copy link
Contributor

twmb commented Feb 6, 2024

@oleiman I think Martin is returning to the Value, not the Source -- the Value is "1", rather than "cleanup,delete"

@oleiman
Copy link
Member

oleiman commented Feb 6, 2024

@oleiman I think Martin is returning to the Value, not the Source -- the Value is "1", rather than "cleanup,delete"

Yup, the numeric cleanup policy value has been fixed :)

reports that cleanup.policy is set at the TopicSource

I assumed this was referring to the Source property on the cleanup policy config in the response, but I might have misunderstood. Maybe @weeco can comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants