mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
issue: #33285 - add idAlloc interface - fix binary unsafe bug for message - fix service discovery lost when repeated address with different server id --------- Signed-off-by: chyezh <chyezh@outlook.com>
18 lines
408 B
Go
18 lines
408 B
Go
//go:build test
|
|
// +build test
|
|
|
|
package resource
|
|
|
|
import "github.com/milvus-io/milvus/internal/streamingnode/server/resource/idalloc"
|
|
|
|
// InitForTest initializes the singleton of resources for test.
|
|
func InitForTest(opts ...optResourceInit) {
|
|
r = &resourceImpl{}
|
|
for _, opt := range opts {
|
|
opt(r)
|
|
}
|
|
if r.rootCoordClient != nil {
|
|
r.timestampAllocator = idalloc.NewTSOAllocator(r.rootCoordClient)
|
|
}
|
|
}
|