fix: [AddField] Expire metacache with rc task timestamp (#42010)

Related to #39718 #41681

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-05-22 17:20:25 +08:00 committed by GitHub
parent 804b175771
commit 22ef03b040
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)},
})