-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cache pointer updates are not thread safe #11
Comments
As a stop-gap measure, bd1c745 adds documentation that these methods are not thread-safe on the same object. I'm willing to take a PR that guards these fields with RwLocks. |
Besides, it would be helpful to know your usecase. I didn't really anticipate objects to be held for a long time (except for |
use case is simple. Try to run https://github.com/sapcc/swift-http-import in multiple workers: https://github.com/sapcc/swift-http-import#performance |
I had another look to be sure. When run with a multi-job config, s-h-i treats all jobs as wholly separate, so we're talking about different |
Multiple threads may cause simultaneous cache updates, e.g.
schwift/account.go
Line 113 in 80c09ef
schwift/account.go
Line 120 in 80c09ef
schwift/account.go
Line 197 in 80c09ef
schwift/container.go
Line 96 in 80c09ef
schwift/container.go
Line 96 in 80c09ef
schwift/object.go
Line 116 in 80c09ef
schwift/object.go
Line 413 in 80c09ef
schwift/object.go
Line 443 in 80c09ef
schwift/object.go
Line 445 in 80c09ef
schwift/object.go
Line 559 in 80c09ef
The text was updated successfully, but these errors were encountered: