|
|
|
@ -881,7 +881,6 @@ func (h *Handler) HandleConn(ctx context.Context, conn net.Conn) error { |
|
|
|
return fmt.Errorf("read message: %w", err) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Parse at least the basic header to get API key and correlation ID
|
|
|
|
if len(messageBuf) < 8 { |
|
|
|
return fmt.Errorf("message too short") |
|
|
|
@ -1050,7 +1049,6 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) { |
|
|
|
requestStart := time.Now() |
|
|
|
apiName := getAPIName(APIKey(req.apiKey)) |
|
|
|
|
|
|
|
|
|
|
|
// Only log high-volume requests at V(2), not V(4)
|
|
|
|
if glog.V(2) { |
|
|
|
glog.V(2).Infof("[API] %s (key=%d, ver=%d, corr=%d)", |
|
|
|
@ -1828,7 +1826,6 @@ func (h *Handler) handleMetadataV5ToV8(correlationID uint32, requestBody []byte, |
|
|
|
// NOTE: Correlation ID is handled by writeResponseWithCorrelationID
|
|
|
|
// Do NOT include it in the response body
|
|
|
|
|
|
|
|
|
|
|
|
// ThrottleTimeMs (4 bytes) - v3+ addition
|
|
|
|
binary.Write(&buf, binary.BigEndian, int32(0)) // No throttling
|
|
|
|
|
|
|
|
@ -1994,7 +1991,6 @@ func (h *Handler) handleListOffsets(correlationID uint32, apiVersion uint16, req |
|
|
|
// Parse minimal request to understand what's being asked (header already stripped)
|
|
|
|
offset := 0 |
|
|
|
|
|
|
|
|
|
|
|
maxBytes := len(requestBody) |
|
|
|
if maxBytes > 64 { |
|
|
|
maxBytes = 64 |
|
|
|
@ -3930,7 +3926,6 @@ func (h *Handler) handleInitProducerId(correlationID uint32, apiVersion uint16, |
|
|
|
// v2+: transactional_id(NULLABLE_STRING) + transaction_timeout_ms(INT32) + producer_id(INT64) + producer_epoch(INT16)
|
|
|
|
// v4+: Uses flexible format with tagged fields
|
|
|
|
|
|
|
|
|
|
|
|
maxBytes := len(requestBody) |
|
|
|
if maxBytes > 64 { |
|
|
|
maxBytes = 64 |
|
|
|
|