mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
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>
23 lines
512 B
Go
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))
|
|
}
|