Zhen Ye 309d564796
enhance: support collection and index with WAL-based DDL framework (#45033)
issue: #43897

- Part of collection/index related DDL is implemented by WAL-based DDL
framework now.
- Support following message type in wal, CreateCollection,
DropCollection, CreatePartition, DropPartition, CreateIndex, AlterIndex,
DropIndex.
- Part of collection/index related DDL can be synced by new CDC now.
- Refactor some UT for collection/index DDL.
- Add Tombstone scheduler to manage the tombstone GC for collection or
partition meta.
- Move the vchannel allocation into streaming pchannel manager.

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2025-10-30 14:24:08 +08:00

23 lines
512 B
Go

package messageutil
import (
"testing"
"github.com/stretchr/testify/assert"
"google.golang.org/protobuf/types/known/fieldmaskpb"
"github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
)
func TestIsSchemaChange(t *testing.T) {
header := &message.AlterCollectionMessageHeader{
UpdateMask: &fieldmaskpb.FieldMask{
Paths: []string{},
},
}
assert.False(t, IsSchemaChange(header))
header.UpdateMask.Paths = []string{message.FieldMaskCollectionSchema}
assert.True(t, IsSchemaChange(header))
}