Fix golint warnings for rootcoord (#11872)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/11894/head
Cai Yudong 2021-11-16 14:27:11 +08:00 committed by GitHub
parent 173e7b3808
commit 29e9adc7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -192,7 +192,7 @@ func (t *CreateCollectionReqTask) Execute(ctx context.Context) error {
ddCollReq.Base.Timestamp = ts
ddOpStr, err := EncodeDdOperation(&ddCollReq, CreateCollectionDDType)
if err != nil {
return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
return fmt.Errorf("encodeDdOperation fail, error = %w", err)
}
// use lambda function here to guarantee all resources to be released
@ -293,7 +293,7 @@ func (t *DropCollectionReqTask) Execute(ctx context.Context) error {
ddReq.Base.Timestamp = ts
ddOpStr, err := EncodeDdOperation(&ddReq, DropCollectionDDType)
if err != nil {
return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
return fmt.Errorf("encodeDdOperation fail, error = %w", err)
}
aliases := t.core.MetaTable.ListAliases(collMeta.ID)
@ -533,7 +533,7 @@ func (t *CreatePartitionReqTask) Execute(ctx context.Context) error {
ddReq.Base.Timestamp = ts
ddOpStr, err := EncodeDdOperation(&ddReq, CreatePartitionDDType)
if err != nil {
return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
return fmt.Errorf("encodeDdOperation fail, error = %w", err)
}
// use lambda function here to guarantee all resources to be released
@ -629,7 +629,7 @@ func (t *DropPartitionReqTask) Execute(ctx context.Context) error {
ddReq.Base.Timestamp = ts
ddOpStr, err := EncodeDdOperation(&ddReq, DropPartitionDDType)
if err != nil {
return fmt.Errorf("EncodeDdOperation fail, error = %w", err)
return fmt.Errorf("encodeDdOperation fail, error = %w", err)
}
// use lambda function here to guarantee all resources to be released

View File

@ -151,12 +151,12 @@ func (t *timetickSync) UpdateTimeTick(in *internalpb.ChannelTimeTickMsg, reason
return nil
}
if len(in.Timestamps) != len(in.ChannelNames) {
return fmt.Errorf("Invalid TimeTickMsg")
return fmt.Errorf("invalid TimeTickMsg")
}
prev, ok := t.proxyTimeTick[in.Base.SourceID]
if !ok {
return fmt.Errorf("Skip ChannelTimeTickMsg from un-recognized proxy node %d", in.Base.SourceID)
return fmt.Errorf("skip ChannelTimeTickMsg from un-recognized proxy node %d", in.Base.SourceID)
}
// if ddl operation not finished, skip current ts update