-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persisters should error if asked to save a persisted resource which doesn't already exist. #837
Comments
Setting the error message could potentially fulfill both goals.
|
could this be adapter specific behavior? my intuition is that making the it seems reasonable (already) that an adapter or backend might want to avoid recreating items with the same ids as any that have already been deleted, and that they might use a variety of strategies to ensure that. i think i'd also like to hear more about the nature of the race conditions. pulibrary/figgy#4174 provides a hint, but i'm curious to know more. |
I don't think it should be adapter specific, but I'm sure we can find efficient methods of implementation. Fedora, for instance, will have a tombstone and just throw an error. A database save could The race condition for us was the following: A. User uploads an item with 600 pages. 25 workers promptly start working them. |
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
Work started on branch master...837-persisters-should-error
|
I added some commits to master...837-persisters-should-error and now only Solr is left, but I don't have a good plan on how to make Solr efficiently. |
I also don't know what to do about |
Hm. For |
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
Right now the following works:
However, this causes race conditions with background jobs. It should do the following:
I'm open to other ideas, instead of
ObjectNotFoundError
. A quick experiment with AR shows that it just returnstrue
for save, but doesn't do anything.The text was updated successfully, but these errors were encountered: