redpanda-data / redpanda-data/redpanda

Fill in `error_message` when there's not enough brokers available

Open
#9,182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhance
Dominant language
C++
Stars
12.6k
Forks
792
PR merge metrics
No merged PRs in 30d

Description

Who is this for and what problem do they have today?

Like reported in #9044, when a node, out of 3 nodes, is in decommissioning Redpanda cannot allocate a replica, hence returning INVALID_REPLICATION_FACTOR, but it's not intuitive to end users.

Upon investigating, it looks like Redpanda doesn't fill in the error_message in this scenario but just returns the error code 38. Can we fill in the error_message field which makes clients like rpk being able to handle the error in a better fashion?

TRACE 2023-02-28 14:05:56,487 [shard 1] kafka - request_context.h:168 - [127.0.0.1:59492] sending 19:create_topics for {rpk}, response {throttle_time_ms=0 topics={{name={test4} topic_id=AAAAAAAAAAAAAAAAAAAAAA== error_code={ error_code: invalid_replication_factor [38] } error_message={nullopt} num_partitions=-1 replication_factor=-1 configs={nullopt}}}}
What are the success criteria?

Redpanda to return a user friendly error message

Why is solving this problem impactful?

Better UX

Additional notes

Relevant GH issue: #9044

JIRA Link: CORE-1188

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the related issue #9044 and tracing the create_topics response path for INVALID_REPLICATION_FACTOR. Confirm how the error_message field is populated in this scenario, then verify that insufficient broker availability returns a user-friendly message and that the response is handled correctly by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.