diff --git a/cmd/filenode.go b/cmd/filenode.go index 69e5218..7d8ada8 100644 --- a/cmd/filenode.go +++ b/cmd/filenode.go @@ -106,6 +106,7 @@ func main() { func Bootstrap(a *app.App) { a.Register(account.New()). + Register(metric.New()). Register(nodeconfsource.New()). Register(nodeconfstore.New()). Register(nodeconf.New()). @@ -118,7 +119,6 @@ func Bootstrap(a *app.App) { Register(store()). Register(redisprovider.New()). Register(index.New()). - Register(metric.New()). Register(server.New()). Register(filenode.New()). Register(deletelog.New()). diff --git a/index/entry.go b/index/entry.go index 6f73f77..858cbbe 100644 --- a/index/entry.go +++ b/index/entry.go @@ -126,6 +126,10 @@ func (ri *redisIndex) getGroupEntry(ctx context.Context, key Key) (entry *groupE return } groupEntryProto.GroupId = key.GroupId + if groupEntryProto.AccountLimit == 0 { + groupEntryProto.Limit = ri.defaultLimit + groupEntryProto.AccountLimit = ri.defaultLimit + } return &groupEntry{GroupEntry: groupEntryProto}, nil }