grpc 1.49.0.pre1-x86_64-linux → 1.49.1-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ec52bd7f68e5462cd13e3a10befb55c5e4abd9f08356c1ba43397afb4955607
4
- data.tar.gz: 94bb0de326ef9a482dd41be64308fa6a485895814190be269333dc75d7c7e94e
3
+ metadata.gz: 3a3df00817062412baeaf9ddc74613e5b937d4ade19a75cbbbaa47762c396920
4
+ data.tar.gz: 89eb9a05f3794eda0062a5d7b713838ff11260aecfc85b3f26ceb59080411eb9
5
5
  SHA512:
6
- metadata.gz: 235f2e931274b09f177d604c3a2baa4ae694539ee6897c80dab49e78409116fdb3ed592e9c47093db08bcf92a6fe253f3f4ffafcd5b365c768a69e3ce9853eb2
7
- data.tar.gz: 2f2a56340fd925dfe231b4d64de3625fbbc0e3cb68c5440184f7d306139e26a9133e6e5a58d21b9ebb47e3c41fff1e66a9aabb653b2cc173cad618920c9dfb0e
6
+ metadata.gz: d2bc192d3ea33d477c640ee8fa2d0e454b1f4badec90273c4c6adf27a52e8063c4f7ce2f5b4fe265fe050b2c400ec7eb90c9625ad775c0f7aabc634b1bbc2845
7
+ data.tar.gz: '09ba44a4adaec08d00e8abc5c8fdb067e7c1772798a3dd30edf3bf22b76bd4b517907e19f0e91b6cfaa7563064216a5b8c417c0477b21ba1c674f2b946453b17'
data/Makefile CHANGED
@@ -454,8 +454,8 @@ Q = @
454
454
  endif
455
455
 
456
456
  CORE_VERSION = 27.0.0
457
- CPP_VERSION = 1.49.0-pre1
458
- CSHARP_VERSION = 2.49.0-pre1
457
+ CPP_VERSION = 1.49.1
458
+ CSHARP_VERSION = 2.49.1
459
459
 
460
460
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
461
461
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -737,10 +737,14 @@ void ClientChannel::ExternalConnectivityWatcher::Notify(
737
737
  // Hop back into the work_serializer to clean up.
738
738
  // Not needed in state SHUTDOWN, because the tracker will
739
739
  // automatically remove all watchers in that case.
740
+ // Note: The callback takes a ref in case the ref inside the state tracker
741
+ // gets removed before the callback runs via a SHUTDOWN notification.
740
742
  if (state != GRPC_CHANNEL_SHUTDOWN) {
743
+ Ref(DEBUG_LOCATION, "RemoveWatcherLocked()").release();
741
744
  chand_->work_serializer_->Run(
742
745
  [this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*chand_->work_serializer_) {
743
746
  RemoveWatcherLocked();
747
+ Unref(DEBUG_LOCATION, "RemoveWatcherLocked()");
744
748
  },
745
749
  DEBUG_LOCATION);
746
750
  }
@@ -754,9 +758,13 @@ void ClientChannel::ExternalConnectivityWatcher::Cancel() {
754
758
  }
755
759
  ExecCtx::Run(DEBUG_LOCATION, on_complete_, GRPC_ERROR_CANCELLED);
756
760
  // Hop back into the work_serializer to clean up.
761
+ // Note: The callback takes a ref in case the ref inside the state tracker
762
+ // gets removed before the callback runs via a SHUTDOWN notification.
763
+ Ref(DEBUG_LOCATION, "RemoveWatcherLocked()").release();
757
764
  chand_->work_serializer_->Run(
758
765
  [this]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*chand_->work_serializer_) {
759
766
  RemoveWatcherLocked();
767
+ Unref(DEBUG_LOCATION, "RemoveWatcherLocked()");
760
768
  },
761
769
  DEBUG_LOCATION);
762
770
  }
@@ -219,7 +219,6 @@ class GrpcLb : public LoadBalancingPolicy {
219
219
  void SendClientLoadReportLocked();
220
220
 
221
221
  // EventEngine callbacks
222
- void MaybeSendClientLoadReport();
223
222
  void MaybeSendClientLoadReportLocked();
224
223
 
225
224
  static void ClientLoadReportDone(void* arg, grpc_error_handle error);
@@ -996,15 +995,11 @@ void GrpcLb::BalancerCallState::ScheduleNextClientLoadReportLocked() {
996
995
  GetDefaultEventEngine()->RunAfter(client_stats_report_interval_, [this] {
997
996
  ApplicationCallbackExecCtx callback_exec_ctx;
998
997
  ExecCtx exec_ctx;
999
- MaybeSendClientLoadReport();
998
+ grpclb_policy()->work_serializer()->Run(
999
+ [this] { MaybeSendClientLoadReportLocked(); }, DEBUG_LOCATION);
1000
1000
  });
1001
1001
  }
1002
1002
 
1003
- void GrpcLb::BalancerCallState::MaybeSendClientLoadReport() {
1004
- grpclb_policy()->work_serializer()->Run(
1005
- [this] { MaybeSendClientLoadReportLocked(); }, DEBUG_LOCATION);
1006
- }
1007
-
1008
1003
  void GrpcLb::BalancerCallState::MaybeSendClientLoadReportLocked() {
1009
1004
  client_load_report_handle_.reset();
1010
1005
  if (this != grpclb_policy()->lb_calld_.get()) {
@@ -50,6 +50,7 @@
50
50
  #include "src/core/lib/gprpp/ref_counted_ptr.h"
51
51
  #include "src/core/lib/gprpp/time.h"
52
52
  #include "src/core/lib/gprpp/work_serializer.h"
53
+ #include "src/core/lib/iomgr/exec_ctx.h"
53
54
  #include "src/core/lib/iomgr/pollset_set.h"
54
55
  #include "src/core/lib/json/json.h"
55
56
  #include "src/core/lib/load_balancing/lb_policy.h"
@@ -456,6 +457,8 @@ WeightedTargetLb::WeightedChild::DelayedRemovalTimer::DelayedRemovalTimer(
456
457
  : weighted_child_(std::move(weighted_child)) {
457
458
  timer_handle_ = GetDefaultEventEngine()->RunAfter(
458
459
  kChildRetentionInterval, [self = Ref()]() mutable {
460
+ ApplicationCallbackExecCtx app_exec_ctx;
461
+ ExecCtx exec_ctx;
459
462
  self->weighted_child_->weighted_target_policy_->work_serializer()->Run(
460
463
  [self = std::move(self)] { self->OnTimerLocked(); },
461
464
  DEBUG_LOCATION);
@@ -414,15 +414,35 @@ void GoogleCloud2ProdResolver::StartXdsResolver() {
414
414
 
415
415
  class GoogleCloud2ProdResolverFactory : public ResolverFactory {
416
416
  public:
417
- // TODO(roth): Remove experimental suffix once this code is proven stable,
418
- // and update the scheme in google_c2p_resolver_test.cc when doing so.
417
+ absl::string_view scheme() const override { return "google-c2p"; }
418
+
419
+ bool IsValidUri(const URI& uri) const override {
420
+ if (GPR_UNLIKELY(!uri.authority().empty())) {
421
+ gpr_log(GPR_ERROR, "google-c2p URI scheme does not support authorities");
422
+ return false;
423
+ }
424
+ return true;
425
+ }
426
+
427
+ OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
428
+ if (!IsValidUri(args.uri)) return nullptr;
429
+ return MakeOrphanable<GoogleCloud2ProdResolver>(std::move(args));
430
+ }
431
+ };
432
+
433
+ // TODO(apolcyn): remove this class after user code has updated to the
434
+ // stable "google-c2p" URI scheme.
435
+ class ExperimentalGoogleCloud2ProdResolverFactory : public ResolverFactory {
436
+ public:
419
437
  absl::string_view scheme() const override {
420
438
  return "google-c2p-experimental";
421
439
  }
422
440
 
423
441
  bool IsValidUri(const URI& uri) const override {
424
442
  if (GPR_UNLIKELY(!uri.authority().empty())) {
425
- gpr_log(GPR_ERROR, "google-c2p URI scheme does not support authorities");
443
+ gpr_log(
444
+ GPR_ERROR,
445
+ "google-c2p-experimental URI scheme does not support authorities");
426
446
  return false;
427
447
  }
428
448
  return true;
@@ -439,6 +459,8 @@ class GoogleCloud2ProdResolverFactory : public ResolverFactory {
439
459
  void RegisterCloud2ProdResolver(CoreConfiguration::Builder* builder) {
440
460
  builder->resolver_registry()->RegisterResolverFactory(
441
461
  absl::make_unique<GoogleCloud2ProdResolverFactory>());
462
+ builder->resolver_registry()->RegisterResolverFactory(
463
+ absl::make_unique<ExperimentalGoogleCloud2ProdResolverFactory>());
442
464
  }
443
465
 
444
466
  } // namespace grpc_core
@@ -22,15 +22,17 @@
22
22
 
23
23
  #include "absl/container/flat_hash_set.h"
24
24
 
25
+ #include "src/core/lib/gprpp/no_destruct.h"
25
26
  #include "src/core/lib/gprpp/sync.h"
26
27
 
27
28
  namespace grpc_event_engine {
28
29
  namespace experimental {
29
30
 
30
31
  namespace {
31
- grpc_core::Mutex g_mu;
32
- bool g_registered{false};
33
- absl::flat_hash_set<Forkable*> g_forkables;
32
+ grpc_core::NoDestruct<grpc_core::Mutex> g_mu;
33
+ bool g_registered ABSL_GUARDED_BY(g_mu){false};
34
+ grpc_core::NoDestruct<absl::flat_hash_set<Forkable*>> g_forkables
35
+ ABSL_GUARDED_BY(g_mu);
34
36
  } // namespace
35
37
 
36
38
  Forkable::Forkable() { ManageForkable(this); }
@@ -38,39 +40,40 @@ Forkable::Forkable() { ManageForkable(this); }
38
40
  Forkable::~Forkable() { StopManagingForkable(this); }
39
41
 
40
42
  void RegisterForkHandlers() {
41
- grpc_core::MutexLock lock(&g_mu);
42
- GPR_ASSERT(!absl::exchange(g_registered, true));
43
- pthread_atfork(PrepareFork, PostforkParent, PostforkChild);
43
+ grpc_core::MutexLock lock(g_mu.get());
44
+ if (!absl::exchange(g_registered, true)) {
45
+ pthread_atfork(PrepareFork, PostforkParent, PostforkChild);
46
+ }
44
47
  };
45
48
 
46
49
  void PrepareFork() {
47
- grpc_core::MutexLock lock(&g_mu);
48
- for (auto* forkable : g_forkables) {
50
+ grpc_core::MutexLock lock(g_mu.get());
51
+ for (auto* forkable : *g_forkables) {
49
52
  forkable->PrepareFork();
50
53
  }
51
54
  }
52
55
  void PostforkParent() {
53
- grpc_core::MutexLock lock(&g_mu);
54
- for (auto* forkable : g_forkables) {
56
+ grpc_core::MutexLock lock(g_mu.get());
57
+ for (auto* forkable : *g_forkables) {
55
58
  forkable->PostforkParent();
56
59
  }
57
60
  }
58
61
 
59
62
  void PostforkChild() {
60
- grpc_core::MutexLock lock(&g_mu);
61
- for (auto* forkable : g_forkables) {
63
+ grpc_core::MutexLock lock(g_mu.get());
64
+ for (auto* forkable : *g_forkables) {
62
65
  forkable->PostforkChild();
63
66
  }
64
67
  }
65
68
 
66
69
  void ManageForkable(Forkable* forkable) {
67
- grpc_core::MutexLock lock(&g_mu);
68
- g_forkables.insert(forkable);
70
+ grpc_core::MutexLock lock(g_mu.get());
71
+ g_forkables->insert(forkable);
69
72
  }
70
73
 
71
74
  void StopManagingForkable(Forkable* forkable) {
72
- grpc_core::MutexLock lock(&g_mu);
73
- g_forkables.erase(forkable);
75
+ grpc_core::MutexLock lock(g_mu.get());
76
+ g_forkables->erase(forkable);
74
77
  }
75
78
 
76
79
  } // namespace experimental
@@ -184,6 +184,8 @@ DNSResolver::TaskHandle NativeDNSResolver::LookupSRV(
184
184
  grpc_pollset_set* /* interested_parties */,
185
185
  absl::string_view /* name_server */) {
186
186
  GetDefaultEventEngine()->Run([on_resolved] {
187
+ ApplicationCallbackExecCtx app_exec_ctx;
188
+ ExecCtx exec_ctx;
187
189
  on_resolved(absl::UnimplementedError(
188
190
  "The Native resolver does not support looking up SRV records"));
189
191
  });
@@ -197,6 +199,8 @@ DNSResolver::TaskHandle NativeDNSResolver::LookupTXT(
197
199
  absl::string_view /* name_server */) {
198
200
  // Not supported
199
201
  GetDefaultEventEngine()->Run([on_resolved] {
202
+ ApplicationCallbackExecCtx app_exec_ctx;
203
+ ExecCtx exec_ctx;
200
204
  on_resolved(absl::UnimplementedError(
201
205
  "The Native resolver does not support looking up TXT records"));
202
206
  });
@@ -168,6 +168,8 @@ DNSResolver::TaskHandle NativeDNSResolver::LookupSRV(
168
168
  grpc_pollset_set* /* interested_parties */,
169
169
  absl::string_view /* name_server */) {
170
170
  GetDefaultEventEngine()->Run([on_resolved] {
171
+ ApplicationCallbackExecCtx app_exec_ctx;
172
+ ExecCtx exec_ctx;
171
173
  on_resolved(absl::UnimplementedError(
172
174
  "The Native resolver does not support looking up SRV records"));
173
175
  });
@@ -181,6 +183,8 @@ DNSResolver::TaskHandle NativeDNSResolver::LookupTXT(
181
183
  absl::string_view /* name_server */) {
182
184
  // Not supported
183
185
  GetDefaultEventEngine()->Run([on_resolved] {
186
+ ApplicationCallbackExecCtx app_exec_ctx;
187
+ ExecCtx exec_ctx;
184
188
  on_resolved(absl::UnimplementedError(
185
189
  "The Native resolver does not support looking up TXT records"));
186
190
  });
@@ -86,7 +86,6 @@ end
86
86
 
87
87
  env_append 'CPPFLAGS', '-DGPR_BACKWARDS_COMPATIBILITY_MODE'
88
88
  env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_NAME_SUFFIX="\"RUBY\""'
89
- env_append 'CPPFLAGS', '-DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
90
89
 
91
90
  require_relative '../../lib/grpc/version'
92
91
  env_append 'CPPFLAGS', '-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX="\"' + GRPC::VERSION + '\""'
@@ -111,6 +110,7 @@ unless windows
111
110
  exit 1 unless $? == 0
112
111
  end
113
112
 
113
+ $CFLAGS << ' -DGRPC_RUBY_WINDOWS_UCRT' if windows_ucrt
114
114
  $CFLAGS << ' -I' + File.join(grpc_root, 'include')
115
115
 
116
116
  ext_export_file = File.join(grpc_root, 'src', 'ruby', 'ext', 'grpc', 'ext-export')
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.49.0.pre1'
17
+ VERSION = '1.49.1'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.49.0.pre1
4
+ version: 1.49.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -1758,7 +1758,6 @@ files:
1758
1758
  - src/ruby/ext/grpc/rb_xds_server_credentials.c
1759
1759
  - src/ruby/ext/grpc/rb_xds_server_credentials.h
1760
1760
  - src/ruby/lib/grpc.rb
1761
- - src/ruby/lib/grpc/2.5/grpc_c.so
1762
1761
  - src/ruby/lib/grpc/2.6/grpc_c.so
1763
1762
  - src/ruby/lib/grpc/2.7/grpc_c.so
1764
1763
  - src/ruby/lib/grpc/3.0/grpc_c.so
@@ -2871,15 +2870,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
2871
2870
  requirements:
2872
2871
  - - ">="
2873
2872
  - !ruby/object:Gem::Version
2874
- version: '2.5'
2873
+ version: '2.6'
2875
2874
  - - "<"
2876
2875
  - !ruby/object:Gem::Version
2877
2876
  version: 3.2.dev
2878
2877
  required_rubygems_version: !ruby/object:Gem::Requirement
2879
2878
  requirements:
2880
- - - ">"
2879
+ - - ">="
2881
2880
  - !ruby/object:Gem::Version
2882
- version: 1.3.1
2881
+ version: '0'
2883
2882
  requirements: []
2884
2883
  rubygems_version: 3.3.4
2885
2884
  signing_key:
Binary file