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.
This commit is contained in:
chrislu
2025-10-16 15:48:12 -07:00
parent 9ce91d2ff3
commit cc16e42162
+3
View File
@@ -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: