Browse Source

🚨 CRITICAL BREAKTHROUGH: Switch case for ListOffsets NEVER MATCHED!

## The Smoking Gun

Switch statement logging shows:
- 316 times: case APIKeyMetadata 
- 0 times: case APIKeyListOffsets (apiKey=2) 
- 6+ times: case APIKeyApiVersions 

## What This Means

The case label for APIKeyListOffsets is NEVER executed, meaning:

1.  TCP receives requests with apiKey=2
2.  REQUEST_LOOP parses and logs them as apiKey=2
3.  Requests are queued to channel
4.  processRequestSync receives a DIFFERENT apiKey value than 2!

OR

The apiKey=2 requests are being ROUTED ELSEWHERE before reaching processRequestSync switch statement!

## Root Cause

The apiKey value is being MODIFIED or CORRUPTED between:
- HTTP-level request parsing (REQUEST_LOOP logs show 2)
- Request queuing
- processRequestSync switch statement execution

OR the requests are being routed to a different channel (data plane vs control plane)
and never reaching the Sync handler!

## Next: Check request routing logic to see if apiKey=2 is being sent to wrong channel
pull/7329/head
chrislu 5 days ago
parent
commit
94f3232e78
  1. 3
      weed/mq/kafka/protocol/handler.go

3
weed/mq/kafka/protocol/handler.go

@ -1112,12 +1112,15 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) {
switch APIKey(req.apiKey) {
case APIKeyApiVersions:
glog.Warningf("🔥 SWITCH MATCHED: APIKeyApiVersions")
response, err = h.handleApiVersions(req.correlationID, req.apiVersion)
case APIKeyMetadata:
glog.Warningf("🔥 SWITCH MATCHED: APIKeyMetadata")
response, err = h.handleMetadata(req.correlationID, req.apiVersion, req.requestBody)
case APIKeyListOffsets:
glog.Warningf("🔥🔥🔥 SWITCH MATCHED: APIKeyListOffsets (apiKey=2)!!!")
glog.Warningf("🟡 processRequestSync: Handling ListOffsets (apiKey=2) - about to call handleListOffsets")
response, err = h.handleListOffsets(req.correlationID, req.apiVersion, req.requestBody)

Loading…
Cancel
Save