From cc16e42162e988ab5568c956850d5f8fabdc65a8 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 16 Oct 2025 15:48:12 -0700 Subject: [PATCH] debug: Add processRequestSync and ListOffsets case logging CRITICAL FINDING: ListOffsets (apiKey=2) requests DISAPPEAR! Evidence: 1. Request loop logs show apiKey=2 is detected 2. Requests reach gateway (visible in socket level) 3. BUT processRequestSync NEVER receives apiKey=2 requests 4. AND "Handling ListOffsets" case log NEVER appears This proves requests are being FILTERED/DROPPED before reaching processRequestSync, likely in: - Request queuing logic - Control/data plane routing - Or some request validation The requests exist at TCP level but vanish before hitting the switch statement in processRequestSync. Next investigation: Check request queuing between request reading and processRequestSync invocation. The data/control plane routing may be dropping ListOffsets requests. --- weed/mq/kafka/protocol/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/mq/kafka/protocol/handler.go b/weed/mq/kafka/protocol/handler.go index cf67eee47..44047441d 100644 --- a/weed/mq/kafka/protocol/handler.go +++ b/weed/mq/kafka/protocol/handler.go @@ -1083,6 +1083,8 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) { requestStart := time.Now() apiName := getAPIName(APIKey(req.apiKey)) + glog.Warningf("🟡 processRequestSync: apiKey=%d (%s), version=%d, correlationID=%d", req.apiKey, apiName, req.apiVersion, req.correlationID) + glog.V(4).Infof("[API] %s (key=%d, ver=%d, corr=%d)", apiName, req.apiKey, req.apiVersion, req.correlationID) @@ -1097,6 +1099,7 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) { response, err = h.handleMetadata(req.correlationID, req.apiVersion, req.requestBody) case APIKeyListOffsets: + glog.Warningf("🟡 processRequestSync: Handling ListOffsets (apiKey=2) - about to call handleListOffsets") response, err = h.handleListOffsets(req.correlationID, req.apiVersion, req.requestBody) case APIKeyCreateTopics: