grpc 1.81.0 → 1.81.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a47814a22ffe57ebcc187d2e2346be34783977c8006ac1efd1f93ee9a352de47
4
- data.tar.gz: c973f22f9fd1d4b0fefa3281df6ad757f1d79e5f6d6029aead67c4e8ecc74638
3
+ metadata.gz: a3d58a5e67d6cf05b54114dfb7095355290f69a459391657279caa301d555307
4
+ data.tar.gz: eeb373b6a4246f149c24631ace8bfc1e78c7a666774982b8f7556abaeb15b0f2
5
5
  SHA512:
6
- metadata.gz: 9238909d32166d31bd42edb85ac7a033e551db7f2bbb1257c8b03801be194507361c6bd57320f2798fbf9b85cce2fa9d444dd84aee296802471252a25401fc39
7
- data.tar.gz: 202924299f2c872fc580fca1b405e691649871c9e8c7d8302e48ce9040efffdffa2d4e9010a13db99026da931ffd164647182aa029039e979c705136520b68ca
6
+ metadata.gz: ab1c195595f71ef70b138dcc6e414f2875d07b909cd9e53af25e26239032c7b04a62e9c22e9cc47766c818d003fe05233f92dca8b9697c65002b5c70c860252a
7
+ data.tar.gz: de0b49f50de44bd93ced0a5277ecf183314613663ea96c3cd44fed086666c71d68aa7587954412e202bca101798e8e34ffd9c69a9132adfbce154d42943518f8
data/Makefile CHANGED
@@ -368,7 +368,7 @@ Q = @
368
368
  endif
369
369
 
370
370
  CORE_VERSION = 54.0.0
371
- CPP_VERSION = 1.81.0
371
+ CPP_VERSION = 1.81.1
372
372
 
373
373
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
374
374
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -191,6 +191,7 @@ const grpc_channel_args* g_channel_args ABSL_GUARDED_BY(*g_mu) = nullptr;
191
191
  // Key bytes live in clients so they outlive the entries in this map
192
192
  NoDestruct<std::map<absl::string_view, GrpcXdsClient*>> g_xds_client_map
193
193
  ABSL_GUARDED_BY(*g_mu);
194
+ bool g_inhibit_map_removal ABSL_GUARDED_BY(*g_mu) = false;
194
195
  char* g_fallback_bootstrap_config ABSL_GUARDED_BY(*g_mu) = nullptr;
195
196
  NoDestruct<std::shared_ptr<GrpcXdsBootstrap>> g_parsed_bootstrap
196
197
  ABSL_GUARDED_BY(*g_mu);
@@ -296,6 +297,10 @@ absl::StatusOr<RefCountedPtr<GrpcXdsClient>> GrpcXdsClient::GetOrCreate(
296
297
  if (xds_client != nullptr) {
297
298
  return xds_client.TakeAsSubclass<GrpcXdsClient>();
298
299
  }
300
+ // Ref count was 0. Remove the entry so that when we call emplace()
301
+ // below, we add a new entry, thus ensuring the lifetime of the map
302
+ // key is correct (since it points into the XdsClient instance).
303
+ g_xds_client_map->erase(it);
299
304
  }
300
305
  // The XdsClient doesn't exist, so we'll create it.
301
306
  std::shared_ptr<GrpcXdsBootstrap> bootstrap = std::move(bootstrap_override);
@@ -313,7 +318,9 @@ absl::StatusOr<RefCountedPtr<GrpcXdsClient>> GrpcXdsClient::GetOrCreate(
313
318
  certificate_provider_store),
314
319
  certificate_provider_store,
315
320
  GetStatsPluginGroupForKeyAndChannelArgs(key, args));
316
- g_xds_client_map->insert_or_assign(xds_client->key(), xds_client.get());
321
+ auto [_, inserted] =
322
+ g_xds_client_map->emplace(xds_client->key(), xds_client.get());
323
+ GRPC_CHECK(inserted) << "Key: " << key;
317
324
  GRPC_TRACE_LOG(xds_client, INFO) << "[xds_client " << xds_client.get()
318
325
  << "] Created xDS client for key " << key;
319
326
  return xds_client;
@@ -368,6 +375,7 @@ void GrpcXdsClient::Orphaned() {
368
375
  XdsClient::Orphaned();
369
376
  lrs_client_.reset();
370
377
  MutexLock lock(g_mu);
378
+ if (g_inhibit_map_removal) return;
371
379
  auto it = g_xds_client_map->find(key_);
372
380
  if (it != g_xds_client_map->end() && it->second == this) {
373
381
  g_xds_client_map->erase(it);
@@ -452,6 +460,11 @@ void SetXdsChannelArgsForTest(grpc_channel_args* args) {
452
460
  g_channel_args = args;
453
461
  }
454
462
 
463
+ void SetInhibitXdsClientMapRemovalForTest(bool inhibit) {
464
+ MutexLock lock(g_mu);
465
+ g_inhibit_map_removal = inhibit;
466
+ }
467
+
455
468
  void UnsetGlobalXdsClientsForTest() {
456
469
  MutexLock lock(g_mu);
457
470
  g_xds_client_map->clear();
@@ -112,6 +112,7 @@ class GrpcXdsClient final : public XdsClient {
112
112
 
113
113
  namespace internal {
114
114
  void SetXdsChannelArgsForTest(grpc_channel_args* args);
115
+ void SetInhibitXdsClientMapRemovalForTest(bool inhibit);
115
116
  void UnsetGlobalXdsClientsForTest();
116
117
  // Sets bootstrap config to be used when no env var is set.
117
118
  // Does not take ownership of config.
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.81.0'
17
+ VERSION = '1.81.1'
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.81.0
4
+ version: 1.81.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gRPC Authors
@@ -3960,7 +3960,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3960
3960
  - !ruby/object:Gem::Version
3961
3961
  version: '0'
3962
3962
  requirements: []
3963
- rubygems_version: 4.0.12
3963
+ rubygems_version: 4.0.13
3964
3964
  specification_version: 4
3965
3965
  summary: GRPC system in Ruby
3966
3966
  test_files: