Skip to content

Commit 4a93020

Browse files
committed
Merge branch 'master' into healthcheck
2 parents 8f2361f + 59dc7fb commit 4a93020

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+619
-724
lines changed

BUILD

-3
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ GRPCXX_PUBLIC_HDRS = [
250250
"include/grpcpp/impl/server_initializer_impl.h",
251251
"include/grpcpp/impl/service_type.h",
252252
"include/grpcpp/resource_quota.h",
253-
"include/grpcpp/resource_quota_impl.h",
254253
"include/grpcpp/security/auth_context.h",
255254
"include/grpcpp/security/auth_metadata_processor.h",
256255
"include/grpcpp/security/auth_metadata_processor_impl.h",
@@ -1045,7 +1044,6 @@ grpc_cc_library(
10451044
"src/core/ext/filters/client_channel/retry_throttle.cc",
10461045
"src/core/ext/filters/client_channel/server_address.cc",
10471046
"src/core/ext/filters/client_channel/service_config.cc",
1048-
"src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc",
10491047
"src/core/ext/filters/client_channel/service_config_parser.cc",
10501048
"src/core/ext/filters/client_channel/subchannel.cc",
10511049
"src/core/ext/filters/client_channel/subchannel_pool_interface.cc",
@@ -1187,7 +1185,6 @@ grpc_cc_library(
11871185
language = "c++",
11881186
deps = [
11891187
"grpc_base",
1190-
"grpc_message_size_filter",
11911188
],
11921189
)
11931190

BUILD.gn

-2
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ config("grpc_config") {
295295
"src/core/ext/filters/client_channel/service_config.cc",
296296
"src/core/ext/filters/client_channel/service_config.h",
297297
"src/core/ext/filters/client_channel/service_config_call_data.h",
298-
"src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc",
299298
"src/core/ext/filters/client_channel/service_config_parser.cc",
300299
"src/core/ext/filters/client_channel/service_config_parser.h",
301300
"src/core/ext/filters/client_channel/subchannel.cc",
@@ -1177,7 +1176,6 @@ config("grpc_config") {
11771176
"include/grpcpp/impl/server_initializer_impl.h",
11781177
"include/grpcpp/impl/service_type.h",
11791178
"include/grpcpp/resource_quota.h",
1180-
"include/grpcpp/resource_quota_impl.h",
11811179
"include/grpcpp/security/auth_context.h",
11821180
"include/grpcpp/security/auth_metadata_processor.h",
11831181
"include/grpcpp/security/auth_metadata_processor_impl.h",

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,6 @@ add_library(grpc
13761376
src/core/ext/filters/client_channel/retry_throttle.cc
13771377
src/core/ext/filters/client_channel/server_address.cc
13781378
src/core/ext/filters/client_channel/service_config.cc
1379-
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc
13801379
src/core/ext/filters/client_channel/service_config_parser.cc
13811380
src/core/ext/filters/client_channel/subchannel.cc
13821381
src/core/ext/filters/client_channel/subchannel_pool_interface.cc
@@ -2049,7 +2048,6 @@ add_library(grpc_unsecure
20492048
src/core/ext/filters/client_channel/retry_throttle.cc
20502049
src/core/ext/filters/client_channel/server_address.cc
20512050
src/core/ext/filters/client_channel/service_config.cc
2052-
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc
20532051
src/core/ext/filters/client_channel/service_config_parser.cc
20542052
src/core/ext/filters/client_channel/subchannel.cc
20552053
src/core/ext/filters/client_channel/subchannel_pool_interface.cc
@@ -2741,7 +2739,6 @@ foreach(_hdr
27412739
include/grpcpp/impl/server_initializer_impl.h
27422740
include/grpcpp/impl/service_type.h
27432741
include/grpcpp/resource_quota.h
2744-
include/grpcpp/resource_quota_impl.h
27452742
include/grpcpp/security/auth_context.h
27462743
include/grpcpp/security/auth_metadata_processor.h
27472744
include/grpcpp/security/auth_metadata_processor_impl.h
@@ -3435,7 +3432,6 @@ foreach(_hdr
34353432
include/grpcpp/impl/server_initializer_impl.h
34363433
include/grpcpp/impl/service_type.h
34373434
include/grpcpp/resource_quota.h
3438-
include/grpcpp/resource_quota_impl.h
34393435
include/grpcpp/security/auth_context.h
34403436
include/grpcpp/security/auth_metadata_processor.h
34413437
include/grpcpp/security/auth_metadata_processor_impl.h

Makefile

-4
Original file line numberDiff line numberDiff line change
@@ -3675,7 +3675,6 @@ LIBGRPC_SRC = \
36753675
src/core/ext/filters/client_channel/retry_throttle.cc \
36763676
src/core/ext/filters/client_channel/server_address.cc \
36773677
src/core/ext/filters/client_channel/service_config.cc \
3678-
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \
36793678
src/core/ext/filters/client_channel/service_config_parser.cc \
36803679
src/core/ext/filters/client_channel/subchannel.cc \
36813680
src/core/ext/filters/client_channel/subchannel_pool_interface.cc \
@@ -4322,7 +4321,6 @@ LIBGRPC_UNSECURE_SRC = \
43224321
src/core/ext/filters/client_channel/retry_throttle.cc \
43234322
src/core/ext/filters/client_channel/server_address.cc \
43244323
src/core/ext/filters/client_channel/service_config.cc \
4325-
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \
43264324
src/core/ext/filters/client_channel/service_config_parser.cc \
43274325
src/core/ext/filters/client_channel/subchannel.cc \
43284326
src/core/ext/filters/client_channel/subchannel_pool_interface.cc \
@@ -4934,7 +4932,6 @@ PUBLIC_HEADERS_CXX += \
49344932
include/grpcpp/impl/server_initializer_impl.h \
49354933
include/grpcpp/impl/service_type.h \
49364934
include/grpcpp/resource_quota.h \
4937-
include/grpcpp/resource_quota_impl.h \
49384935
include/grpcpp/security/auth_context.h \
49394936
include/grpcpp/security/auth_metadata_processor.h \
49404937
include/grpcpp/security/auth_metadata_processor_impl.h \
@@ -5633,7 +5630,6 @@ PUBLIC_HEADERS_CXX += \
56335630
include/grpcpp/impl/server_initializer_impl.h \
56345631
include/grpcpp/impl/service_type.h \
56355632
include/grpcpp/resource_quota.h \
5636-
include/grpcpp/resource_quota_impl.h \
56375633
include/grpcpp/security/auth_context.h \
56385634
include/grpcpp/security/auth_metadata_processor.h \
56395635
include/grpcpp/security/auth_metadata_processor_impl.h \

build_autogenerated.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,6 @@ libs:
795795
- src/core/ext/filters/client_channel/retry_throttle.cc
796796
- src/core/ext/filters/client_channel/server_address.cc
797797
- src/core/ext/filters/client_channel/service_config.cc
798-
- src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc
799798
- src/core/ext/filters/client_channel/service_config_parser.cc
800799
- src/core/ext/filters/client_channel/subchannel.cc
801800
- src/core/ext/filters/client_channel/subchannel_pool_interface.cc
@@ -1657,7 +1656,6 @@ libs:
16571656
- src/core/ext/filters/client_channel/retry_throttle.cc
16581657
- src/core/ext/filters/client_channel/server_address.cc
16591658
- src/core/ext/filters/client_channel/service_config.cc
1660-
- src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc
16611659
- src/core/ext/filters/client_channel/service_config_parser.cc
16621660
- src/core/ext/filters/client_channel/subchannel.cc
16631661
- src/core/ext/filters/client_channel/subchannel_pool_interface.cc

config.m4

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ if test "$PHP_GRPC" != "no"; then
9393
src/core/ext/filters/client_channel/retry_throttle.cc \
9494
src/core/ext/filters/client_channel/server_address.cc \
9595
src/core/ext/filters/client_channel/service_config.cc \
96-
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \
9796
src/core/ext/filters/client_channel/service_config_parser.cc \
9897
src/core/ext/filters/client_channel/subchannel.cc \
9998
src/core/ext/filters/client_channel/subchannel_pool_interface.cc \

config.w32

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ if (PHP_GRPC != "no") {
6262
"src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " +
6363
"src\\core\\ext\\filters\\client_channel\\server_address.cc " +
6464
"src\\core\\ext\\filters\\client_channel\\service_config.cc " +
65-
"src\\core\\ext\\filters\\client_channel\\service_config_channel_arg_filter.cc " +
6665
"src\\core\\ext\\filters\\client_channel\\service_config_parser.cc " +
6766
"src\\core\\ext\\filters\\client_channel\\subchannel.cc " +
6867
"src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " +

gRPC-C++.podspec

-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ Pod::Spec.new do |s|
163163
'include/grpcpp/impl/server_initializer_impl.h',
164164
'include/grpcpp/impl/service_type.h',
165165
'include/grpcpp/resource_quota.h',
166-
'include/grpcpp/resource_quota_impl.h',
167166
'include/grpcpp/security/auth_context.h',
168167
'include/grpcpp/security/auth_metadata_processor.h',
169168
'include/grpcpp/security/auth_metadata_processor_impl.h',

gRPC-Core.podspec

-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ Pod::Spec.new do |s|
279279
'src/core/ext/filters/client_channel/service_config.cc',
280280
'src/core/ext/filters/client_channel/service_config.h',
281281
'src/core/ext/filters/client_channel/service_config_call_data.h',
282-
'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc',
283282
'src/core/ext/filters/client_channel/service_config_parser.cc',
284283
'src/core/ext/filters/client_channel/service_config_parser.h',
285284
'src/core/ext/filters/client_channel/subchannel.cc',

grpc.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ Gem::Specification.new do |s|
201201
s.files += %w( src/core/ext/filters/client_channel/service_config.cc )
202202
s.files += %w( src/core/ext/filters/client_channel/service_config.h )
203203
s.files += %w( src/core/ext/filters/client_channel/service_config_call_data.h )
204-
s.files += %w( src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc )
205204
s.files += %w( src/core/ext/filters/client_channel/service_config_parser.cc )
206205
s.files += %w( src/core/ext/filters/client_channel/service_config_parser.h )
207206
s.files += %w( src/core/ext/filters/client_channel/subchannel.cc )

grpc.gyp

-2
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@
488488
'src/core/ext/filters/client_channel/retry_throttle.cc',
489489
'src/core/ext/filters/client_channel/server_address.cc',
490490
'src/core/ext/filters/client_channel/service_config.cc',
491-
'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc',
492491
'src/core/ext/filters/client_channel/service_config_parser.cc',
493492
'src/core/ext/filters/client_channel/subchannel.cc',
494493
'src/core/ext/filters/client_channel/subchannel_pool_interface.cc',
@@ -997,7 +996,6 @@
997996
'src/core/ext/filters/client_channel/retry_throttle.cc',
998997
'src/core/ext/filters/client_channel/server_address.cc',
999998
'src/core/ext/filters/client_channel/service_config.cc',
1000-
'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc',
1001999
'src/core/ext/filters/client_channel/service_config_parser.cc',
10021000
'src/core/ext/filters/client_channel/subchannel.cc',
10031001
'src/core/ext/filters/client_channel/subchannel_pool_interface.cc',

include/grpcpp/opencensus.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright 2018 gRPC authors.
3+
* Copyright 2019 gRPC authors.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323

2424
namespace grpc_impl {
2525
class ServerContext;
26-
}
26+
} // namespace grpc_impl
2727

2828
namespace grpc {
2929
// These symbols in this file will not be included in the binary unless

include/grpcpp/resource_quota.h

+42-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright 2019 gRPC authors.
3+
* Copyright 2016 gRPC authors.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -19,11 +19,50 @@
1919
#ifndef GRPCPP_RESOURCE_QUOTA_H
2020
#define GRPCPP_RESOURCE_QUOTA_H
2121

22-
#include <grpcpp/resource_quota_impl.h>
22+
struct grpc_resource_quota;
23+
24+
#include <grpcpp/impl/codegen/config.h>
25+
#include <grpcpp/impl/codegen/grpc_library.h>
2326

2427
namespace grpc {
2528

26-
typedef ::grpc_impl::ResourceQuota ResourceQuota;
29+
/// ResourceQuota represents a bound on memory and thread usage by the gRPC
30+
/// library. A ResourceQuota can be attached to a server (via \a ServerBuilder),
31+
/// or a client channel (via \a ChannelArguments).
32+
/// gRPC will attempt to keep memory and threads used by all attached entities
33+
/// below the ResourceQuota bound.
34+
class ResourceQuota final : private ::grpc::GrpcLibraryCodegen {
35+
public:
36+
/// \param name - a unique name for this ResourceQuota.
37+
explicit ResourceQuota(const grpc::string& name);
38+
ResourceQuota();
39+
~ResourceQuota();
40+
41+
/// Resize this \a ResourceQuota to a new size. If \a new_size is smaller
42+
/// than the current size of the pool, memory usage will be monotonically
43+
/// decreased until it falls under \a new_size.
44+
/// No time bound is given for this to occur however.
45+
ResourceQuota& Resize(size_t new_size);
46+
47+
/// Set the max number of threads that can be allocated from this
48+
/// ResourceQuota object.
49+
///
50+
/// If the new_max_threads value is smaller than the current value, no new
51+
/// threads are allocated until the number of active threads fall below
52+
/// new_max_threads. There is no time bound on when this may happen i.e none
53+
/// of the current threads are forcefully destroyed and all threads run their
54+
/// normal course.
55+
ResourceQuota& SetMaxThreads(int new_max_threads);
56+
57+
grpc_resource_quota* c_resource_quota() const { return impl_; }
58+
59+
private:
60+
ResourceQuota(const ResourceQuota& rhs);
61+
ResourceQuota& operator=(const ResourceQuota& rhs);
62+
63+
grpc_resource_quota* const impl_;
64+
};
65+
2766
} // namespace grpc
2867

2968
#endif // GRPCPP_RESOURCE_QUOTA_H

include/grpcpp/server_builder_impl.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ struct grpc_resource_quota;
4141
namespace grpc_impl {
4242

4343
class CompletionQueue;
44-
class ResourceQuota;
4544
class Server;
4645
class ServerCompletionQueue;
4746
class ServerCredentials;
@@ -50,6 +49,7 @@ class ServerCredentials;
5049
namespace grpc {
5150

5251
class AsyncGenericService;
52+
class ResourceQuota;
5353
class Service;
5454
namespace testing {
5555
class ServerBuilderPluginTest;
@@ -228,8 +228,7 @@ class ServerBuilder {
228228
grpc_compression_algorithm algorithm);
229229

230230
/// Set the attached buffer pool for this server
231-
ServerBuilder& SetResourceQuota(
232-
const grpc_impl::ResourceQuota& resource_quota);
231+
ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota);
233232

234233
ServerBuilder& SetOption(std::unique_ptr<grpc::ServerBuilderOption> option);
235234

package.xml

-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config.cc" role="src" />
182182
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config.h" role="src" />
183183
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config_call_data.h" role="src" />
184-
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc" role="src" />
185184
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config_parser.cc" role="src" />
186185
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/service_config_parser.h" role="src" />
187186
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.cc" role="src" />

src/core/ext/filters/client_channel/resolving_lb_policy.h

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy {
6868
RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config;
6969
};
7070

71+
virtual ~ChannelConfigHelper() = default;
72+
7173
// Applies the service config to the channel.
7274
virtual ApplyServiceConfigResult ApplyServiceConfig(
7375
const Resolver::Result& result) = 0;

0 commit comments

Comments
 (0)