gortiz commented on code in PR #18519:
URL: https://github.com/apache/pinot/pull/18519#discussion_r3271948023
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/MailboxService.java:
##########
@@ -121,11 +127,55 @@ public MailboxService(String hostname, int port,
InstanceType instanceType, Pino
CommonConstants.MultiStageQueryRunner.KEY_OF_MAX_INBOUND_QUERY_DATA_BLOCK_SIZE_BYTES,
CommonConstants.MultiStageQueryRunner.DEFAULT_MAX_INBOUND_QUERY_DATA_BLOCK_SIZE_BYTES
);
- _channelManager = new ChannelManager(_clientSslContext,
_maxInboundMessageSize, getIdleTimeout(config));
+ _grpcSenderBackpressureEnabled = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_SENDER_BACKPRESSURE_ENABLED,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_SENDER_BACKPRESSURE_ENABLED
+ );
+ int writeBufferHighWaterMarkBytes = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_WRITE_BUFFER_HIGH_WATER_MARK_BYTES,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_WRITE_BUFFER_HIGH_WATER_MARK_BYTES);
+ int writeBufferLowWaterMarkBytes = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_WRITE_BUFFER_LOW_WATER_MARK_BYTES,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_WRITE_BUFFER_LOW_WATER_MARK_BYTES);
+ _channelManager = new ChannelManager(_clientSslContext,
_maxInboundMessageSize, getIdleTimeout(config),
+ writeBufferHighWaterMarkBytes, writeBufferLowWaterMarkBytes);
_accessControlFactory = accessControlFactory;
+ registerMailboxClientGauges();
LOGGER.info("Initialized MailboxService with hostname: {}, port: {}",
hostname, port);
}
+ /// Registers gauges exposing the memory used by the gRPC client allocator
+ /// shared by every [GrpcSendingMailbox] this service creates. The companion
+ /// gauges for the server allocator are registered in [GrpcMailboxServer].
+ ///
+ /// Notice we are wiring the shaded gRPC Netty allocator
+ /// ([io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator]) rather
than
+ /// the non-shaded one.
+ private void registerMailboxClientGauges() {
Review Comment:
We already have that in MAILBOX_SERVER_USED_*, registered in
GrpcMailboxServer. Probably Gauges are not the best solution, as they only
offer snapshots. We may need to think about moving them to meters, but it would
require to break or duplicate the older metrics.
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/MailboxService.java:
##########
@@ -121,11 +127,55 @@ public MailboxService(String hostname, int port,
InstanceType instanceType, Pino
CommonConstants.MultiStageQueryRunner.KEY_OF_MAX_INBOUND_QUERY_DATA_BLOCK_SIZE_BYTES,
CommonConstants.MultiStageQueryRunner.DEFAULT_MAX_INBOUND_QUERY_DATA_BLOCK_SIZE_BYTES
);
- _channelManager = new ChannelManager(_clientSslContext,
_maxInboundMessageSize, getIdleTimeout(config));
+ _grpcSenderBackpressureEnabled = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_SENDER_BACKPRESSURE_ENABLED,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_SENDER_BACKPRESSURE_ENABLED
+ );
+ int writeBufferHighWaterMarkBytes = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_WRITE_BUFFER_HIGH_WATER_MARK_BYTES,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_WRITE_BUFFER_HIGH_WATER_MARK_BYTES);
+ int writeBufferLowWaterMarkBytes = config.getProperty(
+
CommonConstants.MultiStageQueryRunner.KEY_OF_GRPC_WRITE_BUFFER_LOW_WATER_MARK_BYTES,
+
CommonConstants.MultiStageQueryRunner.DEFAULT_GRPC_WRITE_BUFFER_LOW_WATER_MARK_BYTES);
+ _channelManager = new ChannelManager(_clientSslContext,
_maxInboundMessageSize, getIdleTimeout(config),
+ writeBufferHighWaterMarkBytes, writeBufferLowWaterMarkBytes);
_accessControlFactory = accessControlFactory;
+ registerMailboxClientGauges();
LOGGER.info("Initialized MailboxService with hostname: {}, port: {}",
hostname, port);
}
+ /// Registers gauges exposing the memory used by the gRPC client allocator
+ /// shared by every [GrpcSendingMailbox] this service creates. The companion
+ /// gauges for the server allocator are registered in [GrpcMailboxServer].
+ ///
+ /// Notice we are wiring the shaded gRPC Netty allocator
+ /// ([io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator]) rather
than
+ /// the non-shaded one.
+ private void registerMailboxClientGauges() {
Review Comment:
We already have that in MAILBOX_SERVER_USED_*, registered in
GrpcMailboxServer. Probably Gauges are not the best solution, as they only
offer snapshots. We may need to think about moving them to meters, but it would
require breaking or duplicating the older metrics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]