mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-09-18 17:56:52 +08:00
修改buffer pool大小
This commit is contained in:
@@ -3,7 +3,7 @@ package mysql
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/zr-hebo/sniffer-agent/model"
|
||||
"github.com/zr-hebo/sniffer-agent/util"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ var (
|
||||
adminPasswd string
|
||||
|
||||
coverRangePool = NewCoveragePool()
|
||||
localStmtCache = model.NewSliceBufferPool("statement cache", MaxMysqlPacketLen)
|
||||
localStmtCache = util.NewSliceBufferPool("statement cache", MaxMysqlPacketLen)
|
||||
|
||||
PrepareStatement = []byte(":prepare")
|
||||
)
|
||||
|
@@ -159,6 +159,7 @@ func (ms *MysqlSession) readFromClient(seqID int64, bytes []byte) {
|
||||
ms.expectReceiveSize = extractMysqlPayloadSize(bytes[:4])
|
||||
// ignore too big mysql packet
|
||||
if ms.expectReceiveSize >= MaxMysqlPacketLen {
|
||||
log.Infof("expect receive size is bigger than max deal size: %d", MaxMysqlPacketLen)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user