Files
seaweedfs/weed
chrislu 755346e0b1 Fix CreateTopics v2 parsing for kafka-go client compatibility
CRITICAL FIX: Resolve kafka-go client CreateTopics failures

## Issues Fixed:
- CreateTopics handler was missing apiVersion parameter
- v2+ compact array/string format parsing was incorrect
- Wrong topics count (1274981) due to parsing from incorrect offset
- Response format didn't match v2+ compact format requirements

## Implementation:
- Added apiVersion parameter to handleCreateTopics
- Implemented proper v2+ compact format parsing:
  - Compact arrays: length + 1 (0 = empty, n+1 = n elements)
  - Compact strings: length + 1 (0 = null, n+1 = n chars)
  - Tagged fields support (empty for now)
- Separated v0/v1 and v2+ parsing logic
- Fixed response format for v2+ with compact strings and tagged fields

## Protocol Details:
CreateTopics v2+ request format:
- topics_array (compact) + timeout_ms(4) + validate_only(1) + tagged_fields

CreateTopics v2+ response format:
- correlation_id(4) + throttle_time(4) + topics_array (compact) + tagged_fields

Each topic response:
- name (compact string) + error_code(2) + error_message (compact nullable string) + tagged_fields

## Testing:
- Compilation successful
- Debug logging shows proper parsing of topic names and parameters
- Should resolve kafka-go client CreateTopics API failures

This fix addresses the most critical compatibility issue preventing
kafka-go clients from creating topics successfully.
2025-09-12 09:04:42 -07:00
..
2025-08-09 21:47:29 -07:00
2025-07-19 23:56:17 -07:00
2025-08-30 11:15:48 -07:00
2025-08-31 23:31:28 -07:00
2025-08-22 01:15:42 -07:00
2025-09-10 11:04:42 -07:00
2025-08-30 11:15:48 -07:00
2024-06-25 09:18:11 -07:00
2025-08-30 11:15:48 -07:00
2024-02-14 08:26:38 -08:00
2025-07-19 21:43:34 -07:00
2025-03-17 23:13:27 -07:00