global-registry-bindings 0.8.2 → 0.8.3

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: 8f45ffccad13bf288fb752566c436fbce237beedce8a470161444b4993472c46
4
- data.tar.gz: 21db0fbf13237f6161c743279b4c7d6ea3082766a7d1d5dc64dffcdff84ec758
3
+ metadata.gz: 54da04b391e5887934a2742b3ce27bb8c05332bda16abac5b4ab21b1397b2df8
4
+ data.tar.gz: 98d7ae8c9c4ca502d825f5f0c7a561f3b39c823300a001e6210312a8d36e5346
5
5
  SHA512:
6
- metadata.gz: b06df923964538e8fbeccb957408d9822caec8ab62823c1287bd40d3a475a3f60de8e85260f48c368dc2fa36d2cf53b908cb582e6e12fd878c514e0f562c8877
7
- data.tar.gz: 2623bf80702336e9cd3d5c2fe6a7b3ed6007c5c8779c7b1e762ab888a061511a4c5a252960f1fd5ff0a1c490a50c96cb234f59da9126238127b6d7082a4f22ca
6
+ metadata.gz: 46574b7d39affd391dc650429ff1a8586a209a0e336eff84bcb6ca4c53dc1f3bba08addeee5e2fd939814a3be4a14f3228928c2a107f6dcf2e509bd8747195cf
7
+ data.tar.gz: 10d8d22650b26da903aae867a3f6b17591e901949a315fae1827e5caa7838edcae47a2e4ca1fc6783ebc4eb9e0e6ee62487d4b6e81c85c14e0555b8793a5123e
@@ -20,7 +20,12 @@ module GlobalRegistry # :nodoc:
20
20
  "GR entity #{global_registry_entity.id_value} for #{model.class.name}(#{model.id}) has no mdm id; " \
21
21
  "will retry"
22
22
  end
23
- model.update_column(global_registry_entity.mdm_id_column, mdm_entity_id) # rubocop:disable Rails/SkipsModelValidations
23
+ mdm_id_column = global_registry_entity.mdm_id_column
24
+ # Skip the write when the MDM id is unchanged. update_column always issues an
25
+ # UPDATE, so re-pulling an unchanged MDM id churns the row (and downstream
26
+ # replication/WAL consumers) for no reason.
27
+ return if model.send(mdm_id_column) == mdm_entity_id
28
+ model.update_column(mdm_id_column, mdm_entity_id) # rubocop:disable Rails/SkipsModelValidations
24
29
  end
25
30
 
26
31
  def dig_global_registry_mdm_id_from_entity(entity, type)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GlobalRegistry # :nodoc:
4
4
  module Bindings # :nodoc:
5
- VERSION = "0.8.2"
5
+ VERSION = "0.8.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global-registry-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Zoetewey