From 22ef03b0407a95fbfdcb82a94d5b6ea8376d7a6a Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 22 May 2025 17:20:25 +0800 Subject: [PATCH] fix: [AddField] Expire metacache with rc task timestamp (#42010) Related to #39718 #41681 Signed-off-by: Congqi Xia --- internal/rootcoord/add_field_task.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/rootcoord/add_field_task.go b/internal/rootcoord/add_field_task.go index 76b6a54384..a80e80dd97 100644 --- a/internal/rootcoord/add_field_task.go +++ b/internal/rootcoord/add_field_task.go @@ -65,8 +65,8 @@ func (t *addCollectionFieldTask) Execute(ctx context.Context) error { newField := model.UnmarshalFieldModel(t.fieldSchema) - // ts := t.GetTs() - return executeAddCollectionFieldTaskSteps(ctx, t.core, oldColl, newField, t.Req) + ts := t.GetTs() + return executeAddCollectionFieldTaskSteps(ctx, t.core, oldColl, newField, t.Req, ts) } func (t *addCollectionFieldTask) nextFieldID(coll *model.Collection) int64 { @@ -93,7 +93,7 @@ func executeAddCollectionFieldTaskSteps(ctx context.Context, col *model.Collection, newField *model.Field, req *milvuspb.AddCollectionFieldRequest, - // ts Timestamp, + ts Timestamp, ) error { redoTask := newBaseRedoTask(core.stepExecutor) @@ -130,6 +130,7 @@ func executeAddCollectionFieldTaskSteps(ctx context.Context, dbName: req.GetDbName(), collectionNames: append(aliases, req.GetCollectionName()), collectionID: oldColl.CollectionID, + ts: ts, opts: []proxyutil.ExpireCacheOpt{proxyutil.SetMsgType(commonpb.MsgType_AddCollectionField)}, })