mirror of https://github.com/milvus-io/milvus.git
Fix misc copylocks and remove exclude rule (#22962)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/22927/head
parent
52f4de3ad6
commit
8f847884c2
|
@ -70,8 +70,6 @@ issues:
|
|||
- G307
|
||||
# Use of weak random number generator math/rand
|
||||
- G404
|
||||
# Exclude copylocks
|
||||
- copylocks
|
||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
||||
max-issues-per-linter: 0
|
||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
||||
|
|
|
@ -25,15 +25,15 @@ type DocContent struct {
|
|||
}
|
||||
|
||||
func collect() []DocContent {
|
||||
params := paramtable.ComponentParam{}
|
||||
params := ¶mtable.ComponentParam{}
|
||||
params.Init()
|
||||
|
||||
val := reflect.ValueOf(params)
|
||||
val := reflect.ValueOf(params).Elem()
|
||||
data := make([]DocContent, 0)
|
||||
keySet := typeutil.NewSet[string]()
|
||||
for i := 0; i < val.NumField(); i++ {
|
||||
valueField := val.Field(i)
|
||||
collectRecursive(¶ms, &data, &valueField)
|
||||
collectRecursive(params, &data, &valueField)
|
||||
}
|
||||
result := make([]DocContent, 0)
|
||||
for _, d := range data {
|
||||
|
|
|
@ -211,7 +211,7 @@ func TestFlowGraphManager(t *testing.T) {
|
|||
const channelPrefix = "by-dev-rootcoord-dml-test-fg-mgr-execute-"
|
||||
for _, test := range tests {
|
||||
t.Run(test.testName, func(t *testing.T) {
|
||||
var baseParams = Params.BaseTable
|
||||
var baseParams = &Params.BaseTable
|
||||
baseParams.Save(Params.DataNodeCfg.MemoryWatermark.Key, fmt.Sprintf("%f", test.watermark))
|
||||
for i, memorySize := range test.memorySizes {
|
||||
vchannel := fmt.Sprintf("%s%d", channelPrefix, i)
|
||||
|
|
|
@ -81,7 +81,7 @@ func TestSyncMemoryTooHigh(t *testing.T) {
|
|||
|
||||
for _, test := range tests {
|
||||
t.Run(test.testName, func(t *testing.T) {
|
||||
var baseParams = Params.BaseTable
|
||||
var baseParams = &Params.BaseTable
|
||||
baseParams.Save(Params.DataNodeCfg.MemoryForceSyncSegmentNum.Key, fmt.Sprintf("%d", test.syncSegmentNum))
|
||||
policy := syncMemoryTooHigh()
|
||||
segments := make([]*Segment, len(test.memorySizesInMB))
|
||||
|
|
|
@ -267,7 +267,7 @@ type testIndexNode struct {
|
|||
}
|
||||
|
||||
func initSession(ctx context.Context) *sessionutil.Session {
|
||||
baseTable := paramtable.Get().BaseTable
|
||||
baseTable := ¶mtable.Get().BaseTable
|
||||
rootPath, err := baseTable.Load("etcd.rootPath")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
)
|
||||
|
||||
type mockIndexNodeComponent struct {
|
||||
IndexNode
|
||||
*IndexNode
|
||||
}
|
||||
|
||||
var _ types.IndexNodeComponent = &mockIndexNodeComponent{}
|
||||
|
@ -36,6 +36,6 @@ func NewMockIndexNodeComponent(ctx context.Context) (types.IndexNodeComponent, e
|
|||
return nil, err
|
||||
}
|
||||
return &mockIndexNodeComponent{
|
||||
IndexNode: *node,
|
||||
IndexNode: node,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ var _ MsgStream = (*MqTtMsgStream)(nil)
|
|||
|
||||
// MqTtMsgStream is a msgstream that contains timeticks
|
||||
type MqTtMsgStream struct {
|
||||
mqMsgStream
|
||||
*mqMsgStream
|
||||
chanMsgBuf map[mqwrapper.Consumer][]TsMsg
|
||||
chanMsgPos map[mqwrapper.Consumer]*msgpb.MsgPosition
|
||||
chanStopChan map[mqwrapper.Consumer]chan bool
|
||||
|
@ -473,7 +473,7 @@ func NewMqTtMsgStream(ctx context.Context,
|
|||
syncConsumer := make(chan int, 1)
|
||||
|
||||
return &MqTtMsgStream{
|
||||
mqMsgStream: *msgStream,
|
||||
mqMsgStream: msgStream,
|
||||
chanMsgBuf: chanMsgBuf,
|
||||
chanMsgPos: chanMsgPos,
|
||||
chanStopChan: chanStopChan,
|
||||
|
|
Loading…
Reference in New Issue