pjfanning opened a new pull request, #384:
URL: https://github.com/apache/pekko-persistence-r2dbc/pull/384

   Based on what is in the main branch (targetting 2.0.0-M1 release) and based 
on akka-persistence-r2dbc 1.1.0 behaviour.
   
   This is a simpler version because the main branch has extra changes.
   
   https://github.com/apache/pekko-persistence-jdbc/pull/505 is the equivalent 
change in that module.
   
   ## Changes
   
   - Updated scaladoc for `deleteObject(persistenceId: String, revision: Long)` 
in `scaladsl/R2dbcDurableStateStore.scala` to document that the `revision` 
parameter is the **next** revision (current stored revision + 1), the 
`IllegalStateException` behaviour on mismatch, and the revision-0 full-delete 
semantics.
   - Replaced the reflection-based 
`DurableStateExceptionSupport.createDeleteRevisionExceptionIfSupported` call 
with a direct `throw new IllegalStateException(msg)`.
   - Deleted `DurableStateExceptionSupport.scala` (no longer needed).
   - Fixed `deleteObject(persistenceId, revision)` to enforce optimistic 
locking: the SQL now checks that the stored revision equals `revision - 1`, so 
the delete only succeeds when `storedRevision + 1 == revision` (i.e. the caller 
passes the revision returned by `getObject` plus one).
   - Added a `revision == 0` fast-path in `deleteObject` that performs a full 
hard-delete via `deleteState` with no revision check, matching the documented 
semantics.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to