[skip e2e] Add comment for CreateAliasTask methods (#14539)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/14558/head
congqixia 2021-12-29 22:40:27 +08:00 committed by GitHub
parent 4be0997989
commit 7bb1d6267d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -4852,11 +4852,13 @@ func (c *CreateAliasTask) SetTs(ts Timestamp) {
c.Base.Timestamp = ts
}
// OnEnqueue defines the behavior task enqueued
func (c *CreateAliasTask) OnEnqueue() error {
c.Base = &commonpb.MsgBase{}
return nil
}
// PreExecute defines the action before task execution
func (c *CreateAliasTask) PreExecute(ctx context.Context) error {
c.Base.MsgType = commonpb.MsgType_CreateAlias
c.Base.SourceID = Params.ProxyCfg.ProxyID
@ -4874,12 +4876,14 @@ func (c *CreateAliasTask) PreExecute(ctx context.Context) error {
return nil
}
// Execute defines the actual execution of create alias
func (c *CreateAliasTask) Execute(ctx context.Context) error {
var err error
c.result, err = c.rootCoord.CreateAlias(ctx, c.CreateAliasRequest)
return err
}
// PostExecute defines the post execution, do nothing for create alias
func (c *CreateAliasTask) PostExecute(ctx context.Context) error {
return nil
}