yes-core 2.8.1 → 2.8.2

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: 556abdbb646c43a30ef36450a66d72b26b702ab1041bfce62701cbec40e72e26
4
- data.tar.gz: 15c8870cbb4b60e6b8097479386aa99a6d113fae5950b1d907821e78063f40c4
3
+ metadata.gz: 9ea54d7585d45303f0330a908bb93226d4c1901bd83f3a224dfcd11c41033406
4
+ data.tar.gz: 80488fd3c7a9462d228b6c935ad323062eded7d21c501827aa27c3032eafd09b
5
5
  SHA512:
6
- metadata.gz: 260dc63645964b5a0efa9e2da46e0c7e00b5aed59f13393e80db402f889e73246818573e368038afbea1318d264a6a40a73a68108dcd2c24b14f97531200a3c1
7
- data.tar.gz: bf0561d95288742beb14f5cfd8fe724c7abb52c727a3de97c579171a6fffd3c4f594e4c29d204e4f99a140499ff7dec6acf2aaabb3db5895a85ca5f985fb578f
6
+ metadata.gz: 1e97053eb6e34d272fb6a8651961a0cd2bba24c7b67e5ebce6fca025a55a2751f64dc496736208de97c57e56284feb3afba3ece7fd43c9803d16d782f77dd32b
7
+ data.tar.gz: 2718324306ecc186004b123d0ecf66e4b1679cdc68feaf1d1936c2c69caea23ffd17fd19447cbcf28ab7ff2dc75815f7c2764a8edc719923adfb3986a39539f8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.8.2] - 2026-11-04
4
+ - See root CHANGELOG.md for details.
5
+
3
6
  ## [2.8.1] - 2026-10-30
4
7
  - See root CHANGELOG.md for details.
5
8
 
@@ -131,12 +131,17 @@ module Yes
131
131
  # Locks and reloads the read model row, re-checks the revision and yields.
132
132
  # The lock is held until the surrounding transaction (if any) ends.
133
133
  #
134
+ # Uses +reload(lock: true)+ inside a transaction instead of +with_lock+. +with_lock+ raises when the record
135
+ # has unsaved changes, which is the case when a transaction retry extension (serialization failure,
136
+ # deadlock) re-runs this block after the previous attempt assigned attributes. +reload+ discards them.
137
+ #
134
138
  # @yield Block to execute while the row is locked
135
139
  # @return [Object] Result of the block execution
136
140
  # @raise [RevisionAlreadyAppliedError] When another writer applied the revision in the meantime
137
141
  # @raise [RevisionMismatchError] When the locked row is behind the expected revision
138
142
  def with_row_lock
139
- read_model.with_lock do
143
+ read_model.transaction do
144
+ read_model.reload(lock: true)
140
145
  check_revision_status!
141
146
  raise RevisionMismatchError, revision_mismatch_message unless revision_matches?
142
147
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yes
4
4
  module Core
5
- VERSION = '2.8.1'
5
+ VERSION = '2.8.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yes-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Ritsche