mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
issue: #43897 - Return LastConfirmedMessageID when wal append operation. - Add resource-key-based locker for broadcast-ack operation to protect the coord state when executing ddl. - Resource-key-based locker is held until the broadcast operation is acked. - ResourceKey support shared and exclusive lock. - Add FastAck execute ack right away after the broadcast done to speed up ddl. - Ack callback will support broadcast message result now. - Add tombstone for broadcaster to avoid to repeatedly commit DDL and ABA issue. --------- Signed-off-by: chyezh <chyezh@outlook.com>
24 lines
589 B
Go
24 lines
589 B
Go
package message
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/milvus-io/milvus/pkg/v2/util/funcutil"
|
|
)
|
|
|
|
func TestBroadcastResult(t *testing.T) {
|
|
r := BroadcastResult[*CreateDatabaseMessageHeader, *CreateDatabaseMessageBody]{
|
|
Message: nil,
|
|
Results: map[string]*AppendResult{
|
|
"v1": {},
|
|
"v2": {},
|
|
"abc" + funcutil.ControlChannelSuffix: {},
|
|
},
|
|
}
|
|
|
|
assert.ElementsMatch(t, []string{"v1", "v2"}, r.GetVChannelsWithoutControlChannel())
|
|
assert.NotNil(t, r.GetControlChannelResult())
|
|
}
|