Question about HN6 (Fetch with an unknown topic)

remote: [tester::#HN6] [Decoder] - .ResponseHeader
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .correlation_id (1112415406)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .TAG_BUFFER
remote: [tester::#HN6] [Decoder] - .ResponseBody
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .throttle_time_ms (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .error_code (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .session_id (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .num_responses (1)
remote: [tester::#HN6] [Decoder] - .TopicResponse[0]
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .topic_id (f4000000-0103-2000-0000-000000000000)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .num_partitions (1)
remote: [tester::#HN6] [Decoder] - .PartitionResponse[0]
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .partition_index (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .error_code (100)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .high_watermark (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .last_stable_offset (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .log_start_offset (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .num_aborted_transactions (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .preferred_read_replica (0)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .compact_records_length (18446744073709551615)
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .TAG_BUFFER
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .TAG_BUFFER
remote: [tester::#HN6] [Decoder] :heavy_check_mark: .TAG_BUFFER
remote: [tester::#HN6] ✓ Correlation ID: 1112415406
remote: [tester::#HN6] ✓ Error code: 0 (NO_ERROR)
remote: [tester::#HN6] Expected Topic to be empty, got f4000000-0103-2000-0000-000000000000
remote: [tester::#HN6] Test failed

I think something is broken in this stage Or I am mmissing something here.

  • why is it complaining by topic_id being empty when the requirement clearly wants us to return the topic_id from request.
  • compact_record_length is a high number despite being set to zero.

Seems like this stage is still in WIP.


posting the picture for better visibility

@rahul1990gupta Thanks for highlighting the issue! We’ve fixed it via this PR.

In the meantime, you can try to verify whether you have parsed topic_id correctly. If you are not sure, feel free to provide a link to your code on GitHub, then I can take a look at it for you.

Thanks @andy1li for your quick response. I see that error message has changed there, but still showing error.

Here is the link to the code in python.

@rahul1990gupta Thanks for sharing the code! Would really appreciate it if you could also include the changed error message. :handshake:

@andy1li


This is the error message. there are two things that i am failing

  • compact_record_length should be zero
  • topic_id should match. they looks same on the terminal. So, maybe its a format(byte vs str) issue.

any help is appreciated. thanks.

Hi all,

I’m afraid I’m running into the same issue as @rahul1990gupta, where the TopicID from the request is being sent, but the test says that they don’t match.

@andy1li, any ideas?

I also encountered this error but my mistake was that I was retrieving the wrong topic_id from the request, and looking at everyone’s screenshot I assume that’s what happens.

The fetch request sent by the tests is made of:

Request Header v2 and Fetch Request (Version: 16)

Try to parse the request header correctly first, it does contain a client_id… :slight_smile:

1 Like
  • compact_record_length should be zero

Let me dig deeper into compact_record_length, and get back to you later.

  • topic_id should match. they looks same on the terminal. So, maybe its a format(byte vs str) issue.

@rahul1990gupta Well, the outputs prefixed by [decoder] just tell us how the tester parsed our responses, not confirming they are correct.

topic_id in the response was not correctly parsed from the request.

def parse_fetch_request(data):
    num_topics = int.from_bytes(data[26:27], byteorder='big')
    print(num_topics)
    # 1

    topic_id = data[27 : 27 + 16]
    print(f'topic_id: {topic_id}, {uuid.UUID(bytes=topic_id)}')
    # f4000000-0103-2000-0000-000000000000

    return topic_id

The offsets here are not actually for num_topics and topic_id. May I ask how you chose those specific offsets? @rahul1990gupta

00 00 01 f4 is 500 in decimal, which in this case corresponds to MaxWaitMS.


@nblaisdell2 I don’t have access to your code, but the error message from your screenshot seems exact the same to Rahul’s.

Could you look at my response to him above, and try to explain briefly how you’re parsing topic_id? (Pretend I’m a rubber duck, as in Rubber duck debugging.)

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!