mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-10 07:21:59 +08:00
less logs
This commit is contained in:
@@ -29,10 +29,7 @@ type CoordinatorAssignment struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) handleFindCoordinator(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) {
|
func (h *Handler) handleFindCoordinator(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) {
|
||||||
glog.V(0).Infof("═══════════════════════════════════════════════════════════════")
|
glog.V(2).Infof("FindCoordinator: version=%d, correlation=%d, bodyLen=%d", apiVersion, correlationID, len(requestBody))
|
||||||
glog.V(0).Infof(" 🔍 FIND_COORDINATOR API CALLED (ApiKey 10) version=%d", apiVersion)
|
|
||||||
glog.V(0).Infof("═══════════════════════════════════════════════════════════════")
|
|
||||||
glog.V(4).Infof("FindCoordinator ENTRY: version=%d, correlation=%d, bodyLen=%d", apiVersion, correlationID, len(requestBody))
|
|
||||||
switch apiVersion {
|
switch apiVersion {
|
||||||
case 0:
|
case 0:
|
||||||
glog.V(4).Infof("FindCoordinator - Routing to V0 handler")
|
glog.V(4).Infof("FindCoordinator - Routing to V0 handler")
|
||||||
|
|||||||
@@ -1036,10 +1036,8 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) {
|
|||||||
requestStart := time.Now()
|
requestStart := time.Now()
|
||||||
apiName := getAPIName(APIKey(req.apiKey))
|
apiName := getAPIName(APIKey(req.apiKey))
|
||||||
|
|
||||||
// ═══════════════════════════════════════════════════════════════
|
// Debug: Log API calls at verbose level 2 (disabled by default)
|
||||||
// LOG ALL INCOMING KAFKA API CALLS
|
glog.V(2).Infof("[API] %s (key=%d, ver=%d, corr=%d)",
|
||||||
// ═══════════════════════════════════════════════════════════════
|
|
||||||
glog.V(0).Infof("🔵 [API] %s (key=%d, ver=%d, corr=%d)",
|
|
||||||
apiName, req.apiKey, req.apiVersion, req.correlationID)
|
apiName, req.apiKey, req.apiVersion, req.correlationID)
|
||||||
|
|
||||||
var response []byte
|
var response []byte
|
||||||
|
|||||||
@@ -198,10 +198,6 @@ func (h *Handler) handleOffsetCommit(correlationID uint32, apiVersion uint16, re
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) {
|
func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) {
|
||||||
glog.V(0).Infof("═══════════════════════════════════════════════════════════════")
|
|
||||||
glog.V(0).Infof(" 🔍 OFFSET_FETCH API CALLED (ApiKey 9)")
|
|
||||||
glog.V(0).Infof("═══════════════════════════════════════════════════════════════")
|
|
||||||
|
|
||||||
// Parse OffsetFetch request
|
// Parse OffsetFetch request
|
||||||
request, err := h.parseOffsetFetchRequest(requestBody)
|
request, err := h.parseOffsetFetchRequest(requestBody)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -222,7 +218,7 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req
|
|||||||
group.Mu.RLock()
|
group.Mu.RLock()
|
||||||
defer group.Mu.RUnlock()
|
defer group.Mu.RUnlock()
|
||||||
|
|
||||||
glog.V(0).Infof("[OFFSET_FETCH] Request: group=%s topics=%d", request.GroupID, len(request.Topics))
|
glog.V(2).Infof("[OFFSET_FETCH] Request: group=%s topics=%d", request.GroupID, len(request.Topics))
|
||||||
|
|
||||||
// Build response
|
// Build response
|
||||||
response := OffsetFetchResponse{
|
response := OffsetFetchResponse{
|
||||||
@@ -258,7 +254,7 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req
|
|||||||
if off, meta, err := h.fetchOffset(group, topic.Name, partition); err == nil && off >= 0 {
|
if off, meta, err := h.fetchOffset(group, topic.Name, partition); err == nil && off >= 0 {
|
||||||
fetchedOffset = off
|
fetchedOffset = off
|
||||||
metadata = meta
|
metadata = meta
|
||||||
glog.V(0).Infof("[OFFSET_FETCH] ✓ Found in memory: group=%s topic=%s partition=%d offset=%d",
|
glog.V(2).Infof("[OFFSET_FETCH] Found in memory: group=%s topic=%s partition=%d offset=%d",
|
||||||
request.GroupID, topic.Name, partition, off)
|
request.GroupID, topic.Name, partition, off)
|
||||||
} else {
|
} else {
|
||||||
// Fallback: try fetching from SMQ persistent storage
|
// Fallback: try fetching from SMQ persistent storage
|
||||||
@@ -272,10 +268,10 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req
|
|||||||
if off, meta, err := h.fetchOffsetFromSMQ(key); err == nil && off >= 0 {
|
if off, meta, err := h.fetchOffsetFromSMQ(key); err == nil && off >= 0 {
|
||||||
fetchedOffset = off
|
fetchedOffset = off
|
||||||
metadata = meta
|
metadata = meta
|
||||||
glog.V(0).Infof("[OFFSET_FETCH] ✓ Found in storage: group=%s topic=%s partition=%d offset=%d",
|
glog.V(2).Infof("[OFFSET_FETCH] Found in storage: group=%s topic=%s partition=%d offset=%d",
|
||||||
request.GroupID, topic.Name, partition, off)
|
request.GroupID, topic.Name, partition, off)
|
||||||
} else {
|
} else {
|
||||||
glog.V(0).Infof("[OFFSET_FETCH] ✗ No offset found: group=%s topic=%s partition=%d (will start from auto.offset.reset)",
|
glog.V(2).Infof("[OFFSET_FETCH] No offset found: group=%s topic=%s partition=%d (will start from auto.offset.reset)",
|
||||||
request.GroupID, topic.Name, partition)
|
request.GroupID, topic.Name, partition)
|
||||||
}
|
}
|
||||||
// No offset found in either location (-1 indicates no committed offset)
|
// No offset found in either location (-1 indicates no committed offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user