-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
enhancementNew feature or requestNew feature or request
Description
From channelz.proto
// If non-zero, the server will return a page of results containing
// at most this many items. If zero, the server will choose a
// reasonable page size. Must never be negative.
int64 max_results = 2;
Looks like nodejs (unlike other langs) returns just a single channel by default:
❯ grpcurl -import-path ~dev/grpc/src/proto -proto grpc/channelz/channelz.proto -d '{"max_results": 100}' --plaintext 127.0.0.1:8079 grpc.channelz.v1.Channelz.GetTopChannels | jq '.channel | length'
2
❯ grpcurl -import-path ~dev/grpc/src/proto -proto grpc/channelz/channelz.proto -d '{"max_results": 0}' --plaintext 127.0.0.1:8079 grpc.channelz.v1.Channelz.GetTopChannels | jq '.channel | length'
1
Confirmed this behavior in grpc-nodejs v1.7.x and v1.9.x
We've never noticed it, because the framework automatically lists all pages. However, we can remove extra an RPC by setting default max_results
to something like 10.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request