-
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 you try to save something which is gone now, but used to be persisted. #867
Conversation
Converted to draft because there's an issue with the buffered persister. |
There's a fundamental issue in that in the case of a CompositePersister, the second persister may not be internally consistent. Like if I'm doing a full reindex it doesn't matter if that resource isn't in Solr - I brought it over from postgres. |
931cb2e
to
a845253
Compare
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
refs #837 Co-authored-by: Ayse Durmaz <[email protected]>
a845253
to
d81d2ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻 with one suggestion for an extra comment
@@ -24,6 +24,12 @@ def delete(resource:) | |||
@deletes << resource | |||
super | |||
end | |||
|
|||
# A buffered memory persister can save anything, it doesn't have to hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it doesn't actually persist anything directly; proxies to other persisters.
@@ -16,12 +16,15 @@ def initialize(adapter) | |||
|
|||
# Save a single resource. | |||
# @param resource [Valkyrie::Resource] The resource to save. | |||
# @param external_resource [Boolean] Whether the resource to be saved comes | |||
# from a different metadata store. Allows a resource to be saved even if | |||
# it's not already in the store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add example use case, "e.g. when building a new solr index"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or migrating to a new data store?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpendragon add an example use case?
Upgrades Valkyrie to this branch: samvera/valkyrie#867 See #4672 Work towards #4174
We've been running this for a couple weeks now with no badness. I think we can merge it - but this will probably mean 3.0.0.beta1 or something. |
@@ -16,12 +16,15 @@ def initialize(adapter) | |||
|
|||
# Save a single resource. | |||
# @param resource [Valkyrie::Resource] The resource to save. | |||
# @param external_resource [Boolean] Whether the resource to be saved comes | |||
# from a different metadata store. Allows a resource to be saved even if | |||
# it's not already in the store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpendragon add an example use case?
@hackartisan Take another look? |
Closes #837