Clean up logs and deprecated functions (#7339)
* less logs * fix deprecated grpc.Dial
This commit is contained in:
@@ -2,7 +2,6 @@ package protocol
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -120,21 +119,9 @@ func (pr *partitionReader) serveFetchRequest(ctx context.Context, req *partition
|
||||
startTime := time.Now()
|
||||
result := &partitionFetchResult{}
|
||||
|
||||
// Log request START with full details
|
||||
glog.Infof("[%s] FETCH_START %s[%d]: offset=%d maxBytes=%d maxWait=%dms correlationID=%d",
|
||||
pr.connCtx.ConnectionID, pr.topicName, pr.partitionID, req.requestedOffset, req.maxBytes, req.maxWaitMs, req.correlationID)
|
||||
|
||||
defer func() {
|
||||
result.fetchDuration = time.Since(startTime)
|
||||
|
||||
// Log request END with results
|
||||
resultStatus := "EMPTY"
|
||||
if len(result.recordBatch) > 0 {
|
||||
resultStatus = fmt.Sprintf("DATA(%dB)", len(result.recordBatch))
|
||||
}
|
||||
glog.Infof("[%s] FETCH_END %s[%d]: offset=%d result=%s hwm=%d duration=%.2fms",
|
||||
pr.connCtx.ConnectionID, pr.topicName, pr.partitionID, req.requestedOffset, resultStatus, result.highWaterMark, result.fetchDuration.Seconds()*1000)
|
||||
|
||||
// Send result back to client
|
||||
select {
|
||||
case req.resultChan <- result:
|
||||
@@ -189,9 +176,6 @@ func (pr *partitionReader) serveFetchRequest(ctx context.Context, req *partition
|
||||
pr.connCtx.ConnectionID, pr.topicName, pr.partitionID, req.requestedOffset, hwm)
|
||||
result.recordBatch = []byte{}
|
||||
} else {
|
||||
// Log successful fetch with details
|
||||
glog.Infof("[%s] FETCH SUCCESS %s[%d]: offset %d->%d (hwm=%d, bytes=%d)",
|
||||
pr.connCtx.ConnectionID, pr.topicName, pr.partitionID, req.requestedOffset, newOffset, hwm, len(recordBatch))
|
||||
result.recordBatch = recordBatch
|
||||
pr.bufferMu.Lock()
|
||||
pr.currentOffset = newOffset
|
||||
|
||||
Reference in New Issue
Block a user