Repository navigation
implement atomic bulk delete using observed keys - #523
Merged
Merged
Conversation
| AND activity_iri = :activity-iri | ||
| AND agent_ifi = :agent-ifi | ||
| --~ (if (:registration params) "AND registration = :registration" "AND registration IS NULL") | ||
| AND id IN (:v*:primary-keys) |
Contributor
There was a problem hiding this comment.
does the :v* make it count at 1 param??
Contributor
Author
There was a problem hiding this comment.
Yep that's a hug "value list"
| (includes? msg "ERROR: could not serialize access due to read/write dependencies among transactions"))))) | ||
| (contains? #{"40001" ; serialization_failure | ||
| "40P01"} ; deadlock_detected | ||
| (.getSQLState ^PSQLException ex)))) |
Contributor
There was a problem hiding this comment.
I'd sleep better at night with something like:
(and (instance? PSQLException ex)
(let [msg (.getMessage ^PSQLException ex)
state (.getSQLState ^PSQLException ex)]
(or (contains? #{"40001" ; serialization_failure
"40P01"} ; deadlock_detected
state))
(includes? msg "ERROR: deadlock detected")
(includes? msg "ERROR: could not serialize access due to concurrent update")
(includes? msg "ERROR: could not serialize access due to read/write dependencies among transactions")))))
Contributor
Author
There was a problem hiding this comment.
cliffcaseyyet
approved these changes
Aug 13, 2026
milt
added a commit
that referenced
this pull request
Aug 17, 2026
Special thanks to @chomatdam for original issue and PR! * reproduce document etag race for all routes and actions * added document CAS operations * updated to dev version of lrs lib with impl 412 support * precon handling and retry * atomic put and post * atomic delete * correct conditional in hug template * whoops, fix it everywhere * implement atomic bulk delete using observed keys (#523) * latest LRS with atomic doc switch * opt in to atomic powers * remove unused binding * release of lrs lib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This approach to bulk document delete uses the observed keys of listed documents to delete them. Compare to the serializable tx approach here: #522