diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-10-17 22:11:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-17 22:11:50 -0700 |
| commit | 97f30287821e1c49b816f2e4c05be46728b06a0b (patch) | |
| tree | 1169d6e45c06698fc4081b8cfc27f2d4d2e98684 /weed/mq/kafka/protocol/fetch_multibatch.go | |
| parent | 8d63a9cf5f011baa4b86372b4f28b7179b9dc9cb (diff) | |
| download | seaweedfs-97f30287821e1c49b816f2e4c05be46728b06a0b.tar.xz seaweedfs-97f30287821e1c49b816f2e4c05be46728b06a0b.zip | |
Clean up logs and deprecated functions (#7339)
* less logs
* fix deprecated grpc.Dial
Diffstat (limited to 'weed/mq/kafka/protocol/fetch_multibatch.go')
| -rw-r--r-- | weed/mq/kafka/protocol/fetch_multibatch.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/weed/mq/kafka/protocol/fetch_multibatch.go b/weed/mq/kafka/protocol/fetch_multibatch.go index 61cd19f78..192872850 100644 --- a/weed/mq/kafka/protocol/fetch_multibatch.go +++ b/weed/mq/kafka/protocol/fetch_multibatch.go @@ -8,7 +8,6 @@ import ( "fmt" "hash/crc32" "strings" - "time" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/mq/kafka/compression" @@ -61,7 +60,7 @@ func (f *MultiBatchFetcher) FetchMultipleBatches(ctx context.Context, topicName // Assume average message size + batch overhead // Client requested maxBytes, we should use most of it // Start with larger batches to maximize throughput - estimatedMsgSize := int32(1024) // Typical message size with overhead + estimatedMsgSize := int32(1024) // Typical message size with overhead recordsPerBatch := (maxBytes - 200) / estimatedMsgSize // Use available space efficiently if recordsPerBatch < 100 { recordsPerBatch = 100 // Minimum 100 records per batch @@ -116,9 +115,7 @@ func (f *MultiBatchFetcher) FetchMultipleBatches(ctx context.Context, topicName // Fetch records for this batch // Pass context to respect Kafka fetch request's MaxWaitTime - getRecordsStartTime := time.Now() smqRecords, err := f.handler.seaweedMQHandler.GetStoredRecords(ctx, topicName, partitionID, currentOffset, int(recordsToFetch)) - _ = time.Since(getRecordsStartTime) // getRecordsDuration if err != nil || len(smqRecords) == 0 { break |
