diff options
author | dcherednik <dcherednik@ydb.tech> | 2023-03-02 15:50:11 +0300 |
---|---|---|
committer | dcherednik <dcherednik@ydb.tech> | 2023-03-02 15:50:11 +0300 |
commit | 495429833643392f7c357eb2b077fcf90696201e (patch) | |
tree | de7767f3db825470848815fc2dd887def11b527c /library/cpp/grpc/server/grpc_server.cpp | |
parent | b0c0cfeece895dfee2397f7344920ccd90252cea (diff) | |
download | ydb-495429833643392f7c357eb2b077fcf90696201e.tar.gz |
Feature flag to enable grpc memory quota.
Diffstat (limited to 'library/cpp/grpc/server/grpc_server.cpp')
-rw-r--r-- | library/cpp/grpc/server/grpc_server.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/library/cpp/grpc/server/grpc_server.cpp b/library/cpp/grpc/server/grpc_server.cpp index 0c05c7404e..ed69142882 100644 --- a/library/cpp/grpc/server/grpc_server.cpp +++ b/library/cpp/grpc/server/grpc_server.cpp @@ -145,13 +145,17 @@ void TGRpcServer::Start() { if (Options_.GRpcMemoryQuotaBytes) { // See details KIKIMR-6932 - /* - grpc::ResourceQuota quota("memory_bound"); - quota.Resize(Options_.GRpcMemoryQuotaBytes); + if (Options_.EnableGRpcMemoryQuota) { + grpc::ResourceQuota quota("memory_bound"); + quota.Resize(Options_.GRpcMemoryQuotaBytes); - builder.SetResourceQuota(quota); - */ - Cerr << "GRpc memory quota temporarily disabled due to issues with grpc quoter" << Endl; + builder.SetResourceQuota(quota); + + Cerr << "Set GRpc memory quota to: " << Options_.GRpcMemoryQuotaBytes << Endl; + } else { + Cerr << "GRpc memory quota was set but disabled due to issues with grpc quoter" + ", to enable it use EnableGRpcMemoryQuota option" << Endl; + } } Options_.ServerBuilderMutator(builder); builder.SetDefaultCompressionLevel(Options_.DefaultCompressionLevel); |