From 7bb1d6267d092a61fb81eb6d3209903bcd7df28a Mon Sep 17 00:00:00 2001 From: congqixia Date: Wed, 29 Dec 2021 22:40:27 +0800 Subject: [PATCH] [skip e2e] Add comment for CreateAliasTask methods (#14539) Signed-off-by: Congqi Xia --- internal/proxy/task.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/proxy/task.go b/internal/proxy/task.go index 16b8f3b71a..698cf8bc66 100644 --- a/internal/proxy/task.go +++ b/internal/proxy/task.go @@ -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 }