Skip to content
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

WIP: try optimistic locking system-wide #4326

Closed
wants to merge 2 commits into from

Conversation

no-reply
Copy link
Member

see what happens if we try turning on optimistic locking for all our resources.

tom johnson added 2 commits May 20, 2020 17:14
adds an optimistic locking implementation to `Wings` using Fedora's
`Last-Modified` property and etags.

the existing optimistic locking in the Actor stack counts on etags, so including
them in the lock tokens has immediate value. we'll need a strategy for removing
them later.

for now, this is a fairly naive implementation for early consideration.
sethaj pushed a commit to sethaj/hyrax that referenced this pull request May 21, 2020
From [CircleCI build 17168][1] for [PR samvera#4326][2], we encountered an
error in which we attempted to `+` together `nil` and a String object.
This commit will prevent an application exception when we encounter that
behavior. Below is log entry regarding the error.

```log
ActionView::Template::Error:
       undefined method `+' for nil:NilClass
     # ./app/views/hyrax/homepage/_recent_document.html.erb:7
```

**Is this appropriate?**

I don't know. It looks as though we might want to treat this as in
error. But, given some of the challenges we've had with our feature
specs, I think I'd prefer that this erratic error not break the build.

(Note: When this build broke, Ruby 2.4.7 and 2.6.2 builds of the same
code worked)

[1]:https://circleci.com/gh/samvera/hyrax/17168#tests/containers/5
[2]:samvera#4236
@no-reply
Copy link
Member Author

closing this, as we won't likely pursue this until post-Wings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant