Question about fd8 Fetch multiple messages from disk

compact record length =1 but FD8 tests is still trying to parse 2 records resulting into following error -

[tester::#FD8] Received:
[tester::#FD8] Hex (bytes 266-275)                             | ASCII
[tester::#FD8] ------------------------------------------------+------------------
[tester::#FD8] 00 01 00 00 00 00 01 00 00 00                   | ..........
[tester::#FD8]                 ^                                      ^
[tester::#FD8] Error: Expected int64 length to be 8 bytes, got 5 bytes
[tester::#FD8] Context:
[tester::#FD8] - Fetch Response v16
[tester::#FD8]   - Response Body
[tester::#FD8]     - TopicResponse[0]
[tester::#FD8]       - PartitionResponse[0]
[tester::#FD8]         - RecordBatch[2]
[tester::#FD8]           - max_timestamp
[tester::#FD8]             - INT64
[tester::#FD8]
[tester::#FD8] Test failed

Hi @himanshusahu06, your code is impressively clean! :heart_eyes:

The issue lies with compact_records_length, which doesn’t represent the length of the RecordBatch array. Instead, it reflects the total number of bytes Kafka reads from disk for this array.

There’s no need to recreate the RecordBatch array. You can simply lift it directly from disk.

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

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.