mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
fix: update MixCoord registration in MilvusRoles (#41337)
enhance: update MixCoord registration in MilvusRoles The `runMixCoord` function in `MilvusRoles` was updated to use the `RegisterMixCoord` function from the `rootcoord_metrics` package instead of `RegisterRootCoord`. This change aligns with the recent modifications made to the `rootcoord_metrics` package. issue:https://github.com/milvus-io/milvus/issues/41338 --------- Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
This commit is contained in:
parent
4be6d0e967
commit
deb610e5d3
@ -183,7 +183,7 @@ func (mr *MilvusRoles) runProxy(ctx context.Context, localMsg bool, wg *sync.Wai
|
|||||||
|
|
||||||
func (mr *MilvusRoles) runMixCoord(ctx context.Context, localMsg bool, wg *sync.WaitGroup) component {
|
func (mr *MilvusRoles) runMixCoord(ctx context.Context, localMsg bool, wg *sync.WaitGroup) component {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
return runComponent(ctx, localMsg, wg, components.NewMixCoord, metrics.RegisterRootCoord)
|
return runComponent(ctx, localMsg, wg, components.NewMixCoord, metrics.RegisterMixCoord)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mr *MilvusRoles) runQueryNode(ctx context.Context, localMsg bool, wg *sync.WaitGroup) component {
|
func (mr *MilvusRoles) runQueryNode(ctx context.Context, localMsg bool, wg *sync.WaitGroup) component {
|
||||||
|
|||||||
@ -113,7 +113,7 @@ func runMixCoord(ctx context.Context, localMsg bool) *grpcmixcoord.Server {
|
|||||||
}()
|
}()
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
metrics.RegisterRootCoord(Registry)
|
metrics.RegisterMixCoord(Registry)
|
||||||
return rc
|
return rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,12 +28,10 @@ func TestRegisterMetrics(t *testing.T) {
|
|||||||
assert.NotPanics(t, func() {
|
assert.NotPanics(t, func() {
|
||||||
r := prometheus.NewRegistry()
|
r := prometheus.NewRegistry()
|
||||||
// Make sure it doesn't panic.
|
// Make sure it doesn't panic.
|
||||||
RegisterRootCoord(r)
|
RegisterMixCoord(r)
|
||||||
RegisterDataNode(r)
|
RegisterDataNode(r)
|
||||||
RegisterDataCoord(r)
|
|
||||||
RegisterProxy(r)
|
RegisterProxy(r)
|
||||||
RegisterQueryNode(r)
|
RegisterQueryNode(r)
|
||||||
RegisterQueryCoord(r)
|
|
||||||
RegisterMetaMetrics(r)
|
RegisterMetaMetrics(r)
|
||||||
RegisterStorageMetrics(r)
|
RegisterStorageMetrics(r)
|
||||||
RegisterMsgStreamMetrics(r)
|
RegisterMsgStreamMetrics(r)
|
||||||
|
|||||||
@ -246,7 +246,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// RegisterRootCoord registers RootCoord metrics
|
// RegisterRootCoord registers RootCoord metrics
|
||||||
func RegisterRootCoord(registry *prometheus.Registry) {
|
func RegisterMixCoord(registry *prometheus.Registry) {
|
||||||
registry.Register(RootCoordProxyCounter)
|
registry.Register(RootCoordProxyCounter)
|
||||||
|
|
||||||
// for time tick
|
// for time tick
|
||||||
@ -286,6 +286,8 @@ func RegisterRootCoord(registry *prometheus.Registry) {
|
|||||||
registry.MustRegister(DiskQuota)
|
registry.MustRegister(DiskQuota)
|
||||||
|
|
||||||
RegisterStreamingServiceClient(registry)
|
RegisterStreamingServiceClient(registry)
|
||||||
|
RegisterQueryCoord(registry)
|
||||||
|
RegisterDataCoord(registry)
|
||||||
}
|
}
|
||||||
|
|
||||||
func CleanupRootCoordDBMetrics(dbName string) {
|
func CleanupRootCoordDBMetrics(dbName string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user